| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,11 +8,14 @@ void setup() { | |||
| 8 | 8 | ||
| 9 | 9 | // the display can be set to one of these two addresses: 0x3c (default) or 0x3d | |
| 10 | 10 | // (they might be listed as 0x7a and 0x7b on the circuit board) | |
| 11 | - oled = new SSD1306(I2C.list()[0], 0x3c); | ||
| 11 | + | ||
| 12 | + // you might need to use a different interface on other SBCs | ||
| 13 | + oled = new SSD1306("i2c-1", 0x3c); | ||
| 12 | 14 | } | |
| 13 | 15 | ||
| 14 | 16 | void draw() { | |
| 15 | - line(0, 0, 127, 63); | ||
| 16 | - line(0, 63, 127, 0); | ||
| 17 | - oled.sendImage(get()); | ||
| 17 | + background(255); | ||
| 18 | + line(0, 0, 127, 63); | ||
| 19 | + line(0, 63, 127, 0); | ||
| 20 | + oled.sendImage(get()); | ||
| 18 | 21 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments