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: mbed
main.cpp
00001 #include "mbed.h" 00002 #include "spremnikVode.h" 00003 00004 int main() { 00005 00006 while (1) { 00007 00008 sw.rise(&turnOn); 00009 00010 if (on) { 00011 00012 // razina vode je pala ispod dopustene 00013 if (!sensor && !button) { 00014 full = false; 00015 flash(led, 1000); 00016 } else { led = false; } 00017 00018 // punjenje 00019 if (!sensor && button) { 00020 full = false; 00021 full = startFilling (); 00022 yLed = false; 00023 } 00024 00025 // spremnik je napunjen 00026 if (full && sensor) { 00027 gLed = true; 00028 } else { gLed = false;} 00029 00030 // aktivacija buzzera 00031 if (full && button) { 00032 00033 buttonPressed(); 00034 00035 } 00036 00037 } 00038 } 00039 } 00040 00041 00042 00043 00044
Generated on Fri Sep 9 2022 00:19:13 by
1.7.2