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
src/LCDControl.cpp@19:b2adc97f4700, 2015-10-21 (annotated)
- Committer:
- kevinrhyne
- Date:
- Wed Oct 21 19:56:21 2015 +0000
- Revision:
- 19:b2adc97f4700
- Parent:
- 17:4d0e180cde20
- Child:
- 20:d880506cfdff
working2 leds
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kevinrhyne | 10:99392075e1d0 | 1 | #include "LCDControl.h" |
kevinrhyne | 10:99392075e1d0 | 2 | |
kevinrhyne | 12:ef988c7fe8a4 | 3 | LCDControl::LCDControl() : uLCD(p9,p10,p8){ |
kevinrhyne | 2:03181ee070d3 | 4 | |
kevinrhyne | 17:4d0e180cde20 | 5 | uLCD.printf("LCD initialized\n"); |
kevinrhyne | 10:99392075e1d0 | 6 | |
kevinrhyne | 10:99392075e1d0 | 7 | |
kevinrhyne | 10:99392075e1d0 | 8 | |
kevinrhyne | 10:99392075e1d0 | 9 | } |
kevinrhyne | 2:03181ee070d3 | 10 | |
kevinrhyne | 10:99392075e1d0 | 11 | void LCDControl::update(int strength, bool mode) { //do update stuff on LCD |
kevinrhyne | 10:99392075e1d0 | 12 | |
kevinrhyne | 10:99392075e1d0 | 13 | printStrength(strength); |
kevinrhyne | 10:99392075e1d0 | 14 | } |
kevinrhyne | 2:03181ee070d3 | 15 | |
kevinrhyne | 19:b2adc97f4700 | 16 | void LCDControl::printStrength(float strength) { |
kevinrhyne | 10:99392075e1d0 | 17 | |
kevinrhyne | 17:4d0e180cde20 | 18 | wait(2); |
kevinrhyne | 19:b2adc97f4700 | 19 | uLCD.printf("Strength: %d\n", strength); |
kevinrhyne | 10:99392075e1d0 | 20 | |
kevinrhyne | 11:419e5d18d42b | 21 | } |
kevinrhyne | 19:b2adc97f4700 | 22 | |
kevinrhyne | 19:b2adc97f4700 | 23 | void LCDControl::printString(string printer) { |
kevinrhyne | 19:b2adc97f4700 | 24 | wait(1); |
kevinrhyne | 19:b2adc97f4700 | 25 | uLCD.printf(printer.c_str()); |
kevinrhyne | 19:b2adc97f4700 | 26 | wait(1); |
kevinrhyne | 19:b2adc97f4700 | 27 | } |