File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
java/libraries/io/examples/I2CScreen Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ void setup() {
1414}
1515
1616void draw () {
17- background (255 );
17+ background (0 );
18+ stroke (255 );
1819 line (0 , 0 , 127 , 63 );
1920 line (0 , 63 , 127 , 0 );
2021 oled. sendImage(get ());
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class SSD1306 extends I2C {
6161 img. loadPixels();
6262 for (int y =startY ; y < height && y -startY < 64 ; y ++) {
6363 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])) {
6565 // this isn't the normal (scanline) mapping, but 8 pixels below each other at a time
6666 // white pixels have their bit turned on
6767 frame[x + (y/ 8 )* 128 ] |= (1 << (y % 8 ));
You can’t perform that action at this time.
0 commit comments