Thanks for getting me this far!
return (a>>1)||(a<<7);
This rotated the pixels correctly except for one last issue...
I can draw a line, I can set a pixel anywhere in the grid.
If the left most x is on 0 and it doesn't share the row with another pixel it will show up. If it does share with another pixel, it switches off.
x
0
g.clear(); //face top g.setPixel(2,0); g.setPixel(3,0); g.setPixel(4,0); g.setPixel(5,0); g.setPixel(1,1); g.setPixel(6,1); //face left g.setPixel(0,2); g.setPixel(0,3); // Won't show because of eyes on 2 and 5. g.setPixel(0,4); g.setPixel(0,5); //eyes g.setPixel(2,3); g.setPixel(5,3); //face right //g.setPixel(7,2); //g.setPixel(7,3); //g.setPixel(7,4); //g.setPixel(7,5); //face bottom g.setPixel(2,7); g.setPixel(3,7); g.setPixel(4,7); g.setPixel(5,7); g.setPixel(1,6); g.setPixel(6,6); g.flip();
If I comment out the eyes the left most pixel will show:
g.clear(); //face top g.setPixel(2,0); g.setPixel(3,0); g.setPixel(4,0); g.setPixel(5,0); g.setPixel(1,1); g.setPixel(6,1); //face left g.setPixel(0,2); g.setPixel(0,3); // Won't show because of eyes on 2 and 5. g.setPixel(0,4); g.setPixel(0,5); //eyes //g.setPixel(2,3); //g.setPixel(5,3); //face right //g.setPixel(7,2); //g.setPixel(7,3); //g.setPixel(7,4); //g.setPixel(7,5); //face bottom g.setPixel(2,7); g.setPixel(3,7); g.setPixel(4,7); g.setPixel(5,7); g.setPixel(1,6); g.setPixel(6,6); g.flip();
@chalkers started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for getting me this far!
This rotated the pixels correctly except for one last issue...
I can draw a line, I can set a pixel anywhere in the grid.
If the left most
x
is on0
and it doesn't share the row with another pixel it will show up. If it does share with another pixel, it switches off.If I comment out the eyes the left most pixel will show: