Open this program in the mbed Compiler, where you can edit it and compile it for your hardware.
Download this program as .zip file.
- ANALOG METER, initial offering - Emulation of an analog/mechanical meter using the SPI TFT display \"http://mbed.org/cookbook/SPI-driven-QVGA-TFT\" (touch not used) Meter takes an integer number from 0 - 100 and uses that number to position the meter\'s needle - An additional auto-scaling feature allows for + floating numbers from 0.0 - 10000.0 in \"NewfNumb\" Scaling is noted two ways a. Color of the meter body changes b. A text scale factor is displayed in the upper, right-hand corner, near the full scale reading Value of \"NewfNumb\" Meter_Body Scale_Factor < -0.0 Blue 0 0.1 - 9.9 Green x1 10.0 - 99.0 Yellow x10 100.0 - 999.0 Orange x100 1000.0 - 9990.0 Red x1k >= 10000.0 Red peg! - If NewfNumb is > 600.0, a flashing yellow warning message appears in the center of the meter movement - The date and time are displayed in the lower right corner of the display - The value of NewfNumb being shown in the movement is also displayed in the lower left coener of the display - A timer ISR automatically updates the meter\'s movement Other Stuff: - Additional demo test program, walks analog meter up and down through all auto scales by manipulating the value of NewfNumb - USB serial port used to dump a few messages. Not needed, set to 921600 BAUD - LED1 slowly gets brighter and dimmer as main loop runs - If for some reason, the \"MeterNumber\" int register ends up >100 or <0, a Purple display appears at 50% movement with a \"bad#\" scale factor - There is NO provision for setting the RTC. Note that TimeZone and DST are added to the RTC number
| SPI_TFT | Display control class, based on GraphicsDisplay and TextDisplay |
| touch_tft | Touchscreen control class, based on SPI_TFT |
| Arial12x12.h [code] | |
| Arial24x23.h [code] | |
| Arial28x28.h [code] | |
| BookAntiqua19x19-14.h [code] | |
| Courier10x13-12B.h [code] | |
| Courier8x12-10.h [code] | |
| font_big.h [code] | |
| GraphicsDisplay.cpp [code] | |
| GraphicsDisplay.h [code] | |
| main.cpp [code] | |
| SPI_TFT.cpp [code] | |
| SPI_TFT.h [code] | |
| Terminal11x16-12.h [code] | |
| Terminal6x8.h [code] | |
| Terminal8x12-9.h [code] | |
| TextDisplay.cpp [code] | |
| TextDisplay.h [code] | |
| touch_tft.cpp [code] | |
| touch_tft.h [code] | |
| Verdana22x21-16.h [code] |