Closed besselfunct closed 1 year ago
Your code doesn't work because you aren't wrapping proxy_1
in a display interface. This is the step you are missing: https://github.com/jamwaffles/ssd1306/blob/897ab8e7b44779eea88449fbe058910720ee285d/examples/graphics_i2c_128x32.rs#L66
You'll need to add let interface = ssd1306::I2CDisplayInterface::new(proxy_1);
and use interface
as the first parameter to the Ssd1306::new
constructor.
Ah! That makes sense. I really appreciate your assistance! I apologize for asking such a straightforward question, but I'm still quite new to Rust. I also haven't done much programming outside of data analysis so this constructor stuff is quite new to me.
I appreciate you taking the time to answer my question!
I apologize for asking such a straightforward question,...
No need to apologize, I'm glad that I could help.
ssd1306
in use (if applicable): [0.7.1]Description of the problem/feature request/other
I'm a relative newbie to Rust, and I'd like to perform a simple temperature reading and push it to a display. As far as I understand, I can't use the same I2C interface for all of the items on my bus, since a single peripheral takes ownership of the whole I2C interface. I'm trying to use the
shared-bus
crate as used in the Ferrous Systems training found here.When I attempt to use this, I get an error that
WriteOnlyDataCommand
is not implemented forI2cProxy
.Given that I expect this is a fairly common problem, is there an established solution that works well with the
Ssd1306
crate?Test case (if applicable)