new library for the EADOG LCD display from electronic assembly
Diff: main.cpp
- Revision:
- 1:03129e57a003
- Parent:
- 0:6a3d8b1e3d24
--- a/main.cpp Wed Mar 30 14:39:40 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -// display test for EA DOGM132x-5 with STM32F401RE Nucleo -// sstaub(c)2016 - -#include "mbed.h" -#include "EADOGM132.h" -#include "Small_7.h" -#include "Fonts/ArialR12x14.h" - -/* DOGM132x-5 Wide Range -Pins for STM32F401RE Nucleo - -DOG Pin Purpose ST Pin -40 CS PB_6(D10) -39 Reset PC_7(D9) -38 A0 PA_9(D8) -37 SCL PA_5(D13) -36 MOSI PA_7(D11) -35 VDD 3.3V -34 VDD2 3.3V -33 VSS GND -32 VOUT 1uF -> GND -31 CAP3P 1uF -> CAP1N -30 CAP1N 1uF -> CAP1P -29 CAP1P -28 CAP2P 1uF -> CAP2N -27 CAP2N -26 VSS GND -25 V4 1uF -> GND -24 V3 1uF -> GND -23 V2 1uF -> GND -22 V1 1uF -> GND -21 V0 1uF -> GND - -*/ - -EADOGM132 lcd(PA_7, PA_5, PC_7, PA_9, PB_6); // MOSI, SCL, Reset, A0, CS - -int main() { - - lcd.rect(0, 0, 131, 31, 1); - lcd.fillrect(2, 2, 4, 4, 1); - lcd.fillrect(2, 27, 4, 29, 1); - lcd.fillrect(61, 2, 63, 4, 1); - lcd.fillrect(61, 27, 63, 29, 1); - lcd.line(65, 0, 65, 31, 1); - lcd.circle(33, 15, 10, 1); - lcd.circle(33, 15, 6, 1); - lcd.fillcircle(33, 15, 3, 1); - lcd.locate(70, 1); - lcd.set_font((unsigned char*)ArialR12x14); - lcd.printf("mbed"); - lcd.locate(70, 13); - lcd.set_font((unsigned char*)Small_7); - lcd.printf("EA"); - lcd.locate(70, 22); - lcd.printf("DOGM132x-5"); - - wait(3); - - while(1) { - - lcd.invert(0); - wait(3); - - lcd.invert(1); - wait(3); - } - }