Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed
LCDControl.cpp@4:15165d60fb85, 2015-10-16 (annotated)
- Committer:
- rproctor6
- Date:
- Fri Oct 16 19:32:22 2015 +0000
- Revision:
- 4:15165d60fb85
- Parent:
- 2:03181ee070d3
LCD Control first;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kevinrhyne | 2:03181ee070d3 | 1 | //import LCD stuff |
rproctor6 | 4:15165d60fb85 | 2 | #include "mbed.h" |
rproctor6 | 4:15165d60fb85 | 3 | #include "uLCD_4DGL.h" |
kevinrhyne | 2:03181ee070d3 | 4 | |
rproctor6 | 4:15165d60fb85 | 5 | uLCD_4DGL uLCD(p9,p10,p8); // serial tx, serial rx, reset pin; |
kevinrhyne | 2:03181ee070d3 | 6 | |
kevinrhyne | 2:03181ee070d3 | 7 | class LCDControl{ |
kevinrhyne | 2:03181ee070d3 | 8 | int strength; |
rproctor6 | 4:15165d60fb85 | 9 | bool mode; |
rproctor6 | 4:15165d60fb85 | 10 | public: |
rproctor6 | 4:15165d60fb85 | 11 | void update(int, bool); |
rproctor6 | 4:15165d60fb85 | 12 | void printStrength(int); |
rproctor6 | 4:15165d60fb85 | 13 | }; |
kevinrhyne | 2:03181ee070d3 | 14 | |
rproctor6 | 4:15165d60fb85 | 15 | void LCDControl::update(int x, bool y) { //do update stuff on LCD |
rproctor6 | 4:15165d60fb85 | 16 | strength = x; |
rproctor6 | 4:15165d60fb85 | 17 | mode = y; |
kevinrhyne | 2:03181ee070d3 | 18 | printStrength(strength); |
kevinrhyne | 2:03181ee070d3 | 19 | } |
kevinrhyne | 2:03181ee070d3 | 20 | |
rproctor6 | 4:15165d60fb85 | 21 | void LCDControl::printStrength(int x) { |
rproctor6 | 4:15165d60fb85 | 22 | uLCD.cls(); |
rproctor6 | 4:15165d60fb85 | 23 | uLCD.printf("Signal Strenght: %d", x); |
kevinrhyne | 2:03181ee070d3 | 24 | } |
rproctor6 | 4:15165d60fb85 | 25 |