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
- Committer:
- RobinMechele
- Date:
- 2018-03-23
- Revision:
- 8:556a5738c2fa
- Parent:
- 6:4f13276fd1e2
File content as of revision 8:556a5738c2fa:
#include "mbed.h"
#include "setup.h"
#include "lcdcontrol.h"
#include "master.h"
#include "slave.h"
int ID;
char *IP;
Setup setup;
Master master;
Slave slave;
int main() {
printf("Use the joystick (up/down) to choose the mbed ID\n\r");
printf("Push the joystick to confirm the ID\n\r");
ID = setup.chooseID();
printf("Your mbed has the id %d \n\r", ID);
IP = setup.convertToIP(ID);
printf("Follow the instructions on the lcd screen of the mbed to choose it's mode\n\r\n");
if(setup.chooseMode() == 0)
{
slave.slaveRun(IP, ID);
}
else
{
master.masterRun(IP);
}
}