| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,8 @@ void setup() { | |||
| 14 | 14 | } | |
| 15 | 15 | ||
| 16 | 16 | void draw() { | |
| 17 | - background(255); | ||
| 17 | + background(0); | ||
| 18 | + stroke(255); | ||
| 18 | 19 | line(0, 0, 127, 63); | |
| 19 | 20 | line(0, 63, 127, 0); | |
| 20 | 21 | oled.sendImage(get()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ class SSD1306 extends I2C { | |||
| 61 | 61 | img.loadPixels(); | |
| 62 | 62 | for (int y=startY; y < height && y-startY < 64; y++) { | |
| 63 | 63 | for (int x=startX; x < width && x-startX < 128; x++) { | |
| 64 | - if (brightness(img.pixels[y*img.width+x]) < 128) { | ||
| 64 | + if (128 <= brightness(img.pixels[y*img.width+x])) { | ||
| 65 | 65 | // this isn't the normal (scanline) mapping, but 8 pixels below each other at a time | |
| 66 | 66 | // white pixels have their bit turned on | |
| 67 | 67 | frame[x + (y/8)*128] |= (1 << (y % 8)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments