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: EthernetInterface LM75B mbed-rtos mbed
LcdControl.cpp@5:665ba017d54e, 2018-03-18 (annotated)
- Committer:
- RobinMechele
- Date:
- Sun Mar 18 13:29:52 2018 +0000
- Revision:
- 5:665ba017d54e
- Parent:
- 1:db9b9bec0133
inkorten LcdControl + documentatie in de h.file
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| RobinMechele | 0:29eeb74e55c6 | 1 | #include "lcdcontrol.h" |
| RobinMechele | 0:29eeb74e55c6 | 2 | C12832A1Z scherm(p5, p7, p6, p8, p11); |
| RobinMechele | 0:29eeb74e55c6 | 3 | |
| RobinMechele | 0:29eeb74e55c6 | 4 | LcdControl::LcdControl() |
| RobinMechele | 0:29eeb74e55c6 | 5 | { |
| RobinMechele | 0:29eeb74e55c6 | 6 | //Constructor |
| RobinMechele | 0:29eeb74e55c6 | 7 | } |
| RobinMechele | 0:29eeb74e55c6 | 8 | |
| RobinMechele | 0:29eeb74e55c6 | 9 | void LcdControl::printMode() |
| RobinMechele | 0:29eeb74e55c6 | 10 | { |
| RobinMechele | 5:665ba017d54e | 11 | lcdReset(); |
| RobinMechele | 0:29eeb74e55c6 | 12 | scherm.printf("Use Joystick to choose mode"); |
| RobinMechele | 0:29eeb74e55c6 | 13 | scherm.locate(6,13); |
| RobinMechele | 0:29eeb74e55c6 | 14 | scherm.printf("Master <- -> Slave"); |
| RobinMechele | 0:29eeb74e55c6 | 15 | scherm.locate(0,23); |
| RobinMechele | 0:29eeb74e55c6 | 16 | } |
| RobinMechele | 0:29eeb74e55c6 | 17 | |
| RobinMechele | 5:665ba017d54e | 18 | void LcdControl::printMasterSlave(int mode) |
| RobinMechele | 0:29eeb74e55c6 | 19 | { |
| RobinMechele | 5:665ba017d54e | 20 | if(mode == 0) |
| RobinMechele | 5:665ba017d54e | 21 | { |
| RobinMechele | 5:665ba017d54e | 22 | scherm.printf("Mode: Slave"); |
| RobinMechele | 5:665ba017d54e | 23 | } |
| RobinMechele | 5:665ba017d54e | 24 | else |
| RobinMechele | 5:665ba017d54e | 25 | { |
| RobinMechele | 5:665ba017d54e | 26 | scherm.printf("Mode: Master"); |
| RobinMechele | 5:665ba017d54e | 27 | } |
| RobinMechele | 0:29eeb74e55c6 | 28 | } |
| RobinMechele | 0:29eeb74e55c6 | 29 | |
| RobinMechele | 0:29eeb74e55c6 | 30 | void LcdControl::printID(int ID) |
| RobinMechele | 0:29eeb74e55c6 | 31 | { |
| RobinMechele | 0:29eeb74e55c6 | 32 | scherm.printf("ID = %d",ID); |
| RobinMechele | 0:29eeb74e55c6 | 33 | } |
| RobinMechele | 0:29eeb74e55c6 | 34 | |
| RobinMechele | 0:29eeb74e55c6 | 35 | void LcdControl::lcdReset() |
| RobinMechele | 0:29eeb74e55c6 | 36 | { |
| RobinMechele | 0:29eeb74e55c6 | 37 | scherm.cls(); |
| RobinMechele | 0:29eeb74e55c6 | 38 | scherm.locate(0,0); |
| RobinMechele | 0:29eeb74e55c6 | 39 | } |
| RobinMechele | 0:29eeb74e55c6 | 40 | |
| RobinMechele | 1:db9b9bec0133 | 41 | void LcdControl::lcdSlave(char* text) |
| RobinMechele | 0:29eeb74e55c6 | 42 | { |
| RobinMechele | 1:db9b9bec0133 | 43 | lcdReset(); |
| RobinMechele | 1:db9b9bec0133 | 44 | scherm.printf(text); |
| RobinMechele | 0:29eeb74e55c6 | 45 | } |