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@1:db9b9bec0133, 2018-03-14 (annotated)
- Committer:
- RobinMechele
- Date:
- Wed Mar 14 14:38:43 2018 +0000
- Revision:
- 1:db9b9bec0133
- Parent:
- 0:29eeb74e55c6
- Child:
- 5:665ba017d54e
Alles werkt yayyyy, nu nog bitj kushn;
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 | //Unieke methoden voor setup.cpp |
| RobinMechele | 0:29eeb74e55c6 | 10 | |
| RobinMechele | 0:29eeb74e55c6 | 11 | void LcdControl::printMode() |
| RobinMechele | 0:29eeb74e55c6 | 12 | { |
| RobinMechele | 0:29eeb74e55c6 | 13 | scherm.cls(); |
| RobinMechele | 0:29eeb74e55c6 | 14 | scherm.locate(0,0);//bereik x: 0-X, y: 0-23 |
| RobinMechele | 0:29eeb74e55c6 | 15 | scherm.printf("Use Joystick to choose mode"); |
| RobinMechele | 0:29eeb74e55c6 | 16 | scherm.locate(6,13); |
| RobinMechele | 0:29eeb74e55c6 | 17 | scherm.printf("Master <- -> Slave"); |
| RobinMechele | 0:29eeb74e55c6 | 18 | scherm.locate(0,23); |
| RobinMechele | 0:29eeb74e55c6 | 19 | } |
| RobinMechele | 0:29eeb74e55c6 | 20 | |
| RobinMechele | 0:29eeb74e55c6 | 21 | void LcdControl::printSlave() |
| RobinMechele | 0:29eeb74e55c6 | 22 | { |
| RobinMechele | 0:29eeb74e55c6 | 23 | scherm.printf("Mode: Slave"); |
| RobinMechele | 0:29eeb74e55c6 | 24 | } |
| RobinMechele | 0:29eeb74e55c6 | 25 | |
| RobinMechele | 0:29eeb74e55c6 | 26 | void LcdControl::printMaster() |
| RobinMechele | 0:29eeb74e55c6 | 27 | { |
| RobinMechele | 0:29eeb74e55c6 | 28 | scherm.printf("Mode: Master"); |
| RobinMechele | 0:29eeb74e55c6 | 29 | } |
| RobinMechele | 0:29eeb74e55c6 | 30 | |
| RobinMechele | 0:29eeb74e55c6 | 31 | void LcdControl::printID(int ID) |
| RobinMechele | 0:29eeb74e55c6 | 32 | { |
| RobinMechele | 0:29eeb74e55c6 | 33 | scherm.printf("ID = %d",ID); |
| RobinMechele | 0:29eeb74e55c6 | 34 | } |
| RobinMechele | 0:29eeb74e55c6 | 35 | |
| RobinMechele | 0:29eeb74e55c6 | 36 | //Algemene methoden |
| RobinMechele | 0:29eeb74e55c6 | 37 | void LcdControl::lcdReset() |
| RobinMechele | 0:29eeb74e55c6 | 38 | { |
| RobinMechele | 0:29eeb74e55c6 | 39 | scherm.cls(); |
| RobinMechele | 0:29eeb74e55c6 | 40 | scherm.locate(0,0); |
| RobinMechele | 0:29eeb74e55c6 | 41 | } |
| RobinMechele | 0:29eeb74e55c6 | 42 | |
| RobinMechele | 1:db9b9bec0133 | 43 | //Slave methode |
| RobinMechele | 1:db9b9bec0133 | 44 | void LcdControl::lcdSlave(char* text) |
| RobinMechele | 0:29eeb74e55c6 | 45 | { |
| RobinMechele | 1:db9b9bec0133 | 46 | lcdReset(); |
| RobinMechele | 1:db9b9bec0133 | 47 | scherm.printf(text); |
| RobinMechele | 0:29eeb74e55c6 | 48 | } |