Code for driving 9x OLED displays and reding from an HX711 load cell aplifier.
Dependencies: Adafruit_GFX SPI_TFT_ILI9341 TFT_fonts hx711 mbed
Diff: main.cpp
- Revision:
- 4:89541d91cef1
- Parent:
- 3:6dcf74b20bed
- Child:
- 5:1f0fc1bc6850
diff -r 6dcf74b20bed -r 89541d91cef1 main.cpp --- a/main.cpp Sun Mar 08 22:32:05 2015 +0000 +++ b/main.cpp Mon Mar 09 00:01:09 2015 +0000 @@ -147,16 +147,16 @@ TFT.set_orientation(3); TFT.locate(0,0); TFT.printf(" Hello Mbed 3"); - TFT.set_orientation(1); + TFT.set_orientation(2); TFT.set_font((unsigned char*) Arial24x23); - TFT.locate(50,100); - TFT.printf("TFT orientation"); + TFT.locate(5,100); + TFT.printf("The Mixologist"); // draw some graphics TFT.cls(); TFT.set_font((unsigned char*) Arial24x23); - TFT.locate(100,100); - TFT.printf("Graphic"); + TFT.locate(5,100); + TFT.printf("The Mixologist"); TFT.line(0,0,100,0,Green); TFT.line(0,0,0,200,Green); @@ -245,7 +245,7 @@ gOled8.setTextSize(2); gOled9.setTextSize(2); - + TFT.cls(); while(1) { led1 = 0; @@ -274,13 +274,17 @@ y--; a++; b--; - TFT.locate(10,100); + TFT.locate(10,80); + TFT.foreground(65535); TFT.printf("A Value:%d",a); - TFT.locate(10,125); + TFT.locate(10,120); + TFT.foreground(65504); TFT.printf("B Value:%d",b); - TFT.locate(10,150); + TFT.locate(10,160); + TFT.foreground(2016); TFT.printf("X Value:%d",x); - TFT.locate(10,175); + TFT.locate(10,200); + TFT.foreground(05535); TFT.printf("Y Value:%d",y); //wait(0.1); }