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 ain(p20); 00004 DigitalOut myled(p21); 00005 00006 int main() { 00007 while (1){ 00008 int ledpwm = (int)ain * 256; 00009 int i; 00010 for (i = 0; i < 256; i++){ 00011 if (i < ledpwm) 00012 myled = 1; 00013 else 00014 myled = 0; 00015 00016 wait_us(100); 00017 } 00018 } 00019 }
Generated on Thu Jul 21 2022 05:25:45 by
1.7.2