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.
Fork of g3_waterplay by
main.cpp
00001 /* 00002 * G3: WATERPLAY 00003 */ 00004 00005 #include "mbed.h" 00006 #include "Flasher.h" 00007 #include "SalinitySensor.h" 00008 #include "TemperatureSensor.h" 00009 #include "Thermostat.h" 00010 #include "Waterplay.h" 00011 #include "TextLCD.h" 00012 #include "Printer.h" 00013 #include "Tank.h" 00014 00015 DRV8825 salinitySyringe( 00016 p21, p27, p28, p29, p22, p23 00017 ); 00018 DRV8825 waterSyringe( 00019 p24, p27, p28, p29, p25, p26 00020 ); 00021 TextLCD lcd( 00022 p19, p20, p11, p12, p13, p14 00023 ); 00024 char buffer[128]; 00025 char program_name[128] = "G3: WATERPLAY"; 00026 int keep_running = 1; 00027 Serial serial(USBTX, USBRX); 00028 Flasher led1(LED1); 00029 Printer printer(serial, lcd); 00030 00031 SalinitySensor salinitySensor( 00032 printer, 00033 p16 00034 ); 00035 00036 TemperatureSensor temperatureSensor( 00037 printer, 00038 p15 00039 ); 00040 00041 Thermostat thermostat( 00042 printer, 00043 p18, 00044 LED4 00045 ); 00046 00047 Ping pinger(p30); 00048 00049 Tank tank( 00050 printer, 00051 salinitySyringe, 00052 waterSyringe, 00053 pinger 00054 ); 00055 00056 Waterplay waterplay( 00057 printer, 00058 temperatureSensor, 00059 salinitySensor, 00060 thermostat, 00061 tank, 00062 led1 00063 ); 00064 00065 int main() 00066 { 00067 printer.display(); 00068 led1.flash(1); 00069 00070 while(keep_running) { 00071 waterplay.control(); 00072 //keep_running = 0; 00073 } 00074 }
Generated on Tue Jul 12 2022 21:07:58 by
1.7.2
