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
main.cpp@5:665ba017d54e, 2018-03-18 (annotated)
- Committer:
- RobinMechele
- Date:
- Sun Mar 18 13:29:52 2018 +0000
- Revision:
- 5:665ba017d54e
- Parent:
- 3:fbf3c92f10ee
- Child:
- 6:4f13276fd1e2
inkorten LcdControl + documentatie in de h.file
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RobinMechele | 5:665ba017d54e | 1 | #include "mbed.h" |
RobinMechele | 0:29eeb74e55c6 | 2 | #include "setup.h" |
RobinMechele | 0:29eeb74e55c6 | 3 | #include "lcdcontrol.h" |
RobinMechele | 1:db9b9bec0133 | 4 | #include "master.h" |
RobinMechele | 1:db9b9bec0133 | 5 | #include "slave.h" |
RobinMechele | 0:29eeb74e55c6 | 6 | |
RobinMechele | 0:29eeb74e55c6 | 7 | int ID; |
RobinMechele | 0:29eeb74e55c6 | 8 | char *IP; |
RobinMechele | 0:29eeb74e55c6 | 9 | Setup setup; |
RobinMechele | 1:db9b9bec0133 | 10 | Master master; |
RobinMechele | 1:db9b9bec0133 | 11 | Slave slave; |
RobinMechele | 1:db9b9bec0133 | 12 | |
RobinMechele | 0:29eeb74e55c6 | 13 | |
RobinMechele | 0:29eeb74e55c6 | 14 | |
RobinMechele | 0:29eeb74e55c6 | 15 | int main() { |
RobinMechele | 0:29eeb74e55c6 | 16 | ID = setup.chooseID(); |
RobinMechele | 0:29eeb74e55c6 | 17 | IP = setup.convertToIP(ID); |
RobinMechele | 0:29eeb74e55c6 | 18 | if(setup.chooseMode() == 0) |
RobinMechele | 0:29eeb74e55c6 | 19 | { |
RobinMechele | 3:fbf3c92f10ee | 20 | slave.slaveRun(IP, ID); |
RobinMechele | 0:29eeb74e55c6 | 21 | } |
RobinMechele | 0:29eeb74e55c6 | 22 | else |
RobinMechele | 0:29eeb74e55c6 | 23 | { |
RobinMechele | 1:db9b9bec0133 | 24 | master.masterRun(IP); |
RobinMechele | 0:29eeb74e55c6 | 25 | } |
RobinMechele | 2:ecc0c5c14bc1 | 26 | } |