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.
main.cpp
00001 #include "mbed.h" 00002 00003 AnalogIn input(p16); 00004 00005 DigitalOut pin_low(p24); 00006 DigitalOut pin_high(p25); 00007 DigitalOut led_low(LED4); 00008 DigitalOut led_high(LED3); 00009 00010 #define THRESHOLD_LOW (0.9 / 3.3) 00011 #define THRESHOLD_HIGH (3.0 / 3.3) 00012 00013 int main() { 00014 while(1) { 00015 pin_low = led_low = (input < THRESHOLD_LOW); 00016 pin_high = led_high = (input > THRESHOLD_HIGH); 00017 } 00018 }
Generated on Fri Jul 22 2022 09:56:19 by
