-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static noise when using crate with embedded_graphics #172
Comments
115200 is quite strange for I2C. Can you try You could also try adding a clear/flush just after init, e.g. display.init().unwrap();
display.clear().unwrap();
display.flush().unwrap(); I've anecdotally had this fix the static issue for me in the past, but I'm still unsure of its root cause. If possible, try a different SSD1306 module to check if it's a hardware fault. Some of mine just seem to die sometimes. |
Try SH1106 library. SSD1306 ALMOST works ok with screens using sh1106, but doesn't clear them ok, and in the terminal mode the text is shifted a bit (and possibly many other small differences). Your screen on photo looks exactly like mine - sh1106. https://docs.rs/sh1106/latest/sh1106/# |
Ok, my bad. That was a power-on bad reset. |
ssd1306
in use (if applicable): [0.7.1]Description of the problem/feature request/other
The source code is linked at the bottom. So I'm trying to run the
graphics_i2c.rs
example and I tried adapting it to fit with my Arduino Uno. The code compiles and all, but the problem is that instead of displaying the shapes correctly I get some static noise:Other examples that don't use
embedded_graphics
do work such as the one onREADME.md
. I'm not very experienced with microcontrollers but I suspect that the way I set up the connection may be the culprit.This is the only part of the code that differs from the example so it must be it! However, I don't know what's wrong with it. I checked the default baud rate of the ssd1306 and it's 115200, and that's the baud rate set. The appropriate connections seem to be set up correctly, so what is it? It can't be the hardware as the same screen worked just fine for other examples. It has a 5V connection.
main.rs
Cargo.toml
The text was updated successfully, but these errors were encountered: