Hi all, Newby and this could be a simple question for you all.
I'm starting with the TinyScreen and eventualy I want to build a little instrument for the cockpit from my scaleglider.
To do that, the first thing I have to learn is rotating the example on the screen, that is now horizontal.
Anyone who could help me? I assume this is the part where the change has to come? Rectangle to something else?
void hardwareDrawCommands(){
//Accelerated drawing commands are executed by the display controller
//clearScreen();//clears entire display- the same as clearWindow(0,0,96,64)
display.clearScreen();
//drawRect(x stary, y start, width, height, fill, 8bitcolor);//sets specified OLED controller memory to an 8 bit color, fill is a boolean- TSRectangleFilled or TSRectangleNoFill
display.drawRect(10,10,76,44,TSRectangleFilled,TS_8b_Red);
//drawRect(x stary, y start, width, height, fill, red, green, blue);//like above, but uses 6 bit color values. Red and blue ignore the LSB.
display.drawRect(15,15,66,34,TSRectangleFilled,20,30,60);
//clearWindow(x start, y start, width, height);//clears specified OLED controller memory
display.clearWindow(20,20,56,24);
//drawLine(x1, y1, x2, y2, 8bitcolor);//draw a line from (x1,y1) to (x2,y2) with an 8 bit color
display.drawLine(0,0,95,63,TS_8b_Green);
//drawLine(x1, y1, x2, y2, red, green, blue);//like above, but uses 6 bit color values. Red and blue ignore the LSB.
display.drawLine(0,63,95,0,0,63,0);
delay(1000);
//use 16 bit version of drawLine to fade a rectangle from blue to green:
for(int i=0;i<64;i++){
display.drawLine(0,i,95,i,0,i,63-i);
}
delay(1000);
}
Thanks
Martin