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 // example using same pin as analog and digital, sford 00002 00003 #include "mbed.h" 00004 00005 float do_something_analog() { 00006 AnalogIn x(p20); 00007 return x.read(); 00008 } 00009 00010 void do_something_digital() { 00011 DigitalOut x(p20); 00012 x = 1; 00013 wait(0.5); 00014 x = 0; 00015 } 00016 00017 int main() { 00018 while(1) { 00019 do_something_analog(); 00020 do_something_digital(); 00021 } 00022 }
Generated on Sat Jul 16 2022 05:55:15 by
1.7.2