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 int main(void){ 00004 00005 AnalogIn Pot(A0); 00006 DigitalOut led1(LED1); 00007 DigitalOut led2(LED2); 00008 DigitalOut led3(LED3); 00009 DigitalOut led4(LED4); 00010 00011 while(1){ 00012 led1 = (Pot > 0.2f) ? 1:0; 00013 led2 = (Pot > 0.4f) ? 1:0; 00014 led3 = (Pot > 0.6f) ? 1:0; 00015 led4 = (Pot > 0.8f) ? 1:0; 00016 } 00017 00018 }
Generated on Tue Jul 12 2022 20:19:41 by
1.7.2