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: C12832 LM75B mbed EthernetInterface mbed-rtos
main.cpp
00001 #include "mbed.h" 00002 #include "lcd.h" 00003 #include "buzzer_music.h" 00004 #include "rgb.h" 00005 #include "potentiometer.h" 00006 #include "temperature.h" 00007 #include "slave.h" 00008 #include "master.h" 00009 #include "selection.h" 00010 00011 using namespace ProjectOne; 00012 00013 int main() { 00014 BuzzerMusic buzzerMusic; 00015 Temperature temperatureReader; 00016 Potentiometer potentiometerReader; 00017 RGB rgbLed; 00018 LCD lcdApplicationBoard; 00019 Selection selection; 00020 00021 string mode; 00022 int id; 00023 00024 mode = selection.determineMode(); 00025 printf("The mode you selected: '%s'\r\n", mode.c_str()); 00026 00027 id = selection.determineId(); 00028 printf("The id you selected is '%d'\r\n", id); 00029 00030 if(mode == "slave"){ 00031 Slave slave(id, &temperatureReader,&potentiometerReader,&lcdApplicationBoard,&rgbLed,&buzzerMusic); 00032 while(true){ 00033 slave.handleIncomingFrame(); 00034 } 00035 } 00036 if(mode == "master"){ 00037 Master master(id); 00038 while(true){ 00039 master.handlePcData(); 00040 } 00041 } 00042 } 00043 00044
Generated on Sat Jul 23 2022 22:59:36 by
1.7.2