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 00004 Serial pic(A0,A1); 00005 AnalogOut myled(A2); 00006 00007 00008 char RDATA; 00009 char baff; 00010 int flug = 0; 00011 00012 void get(){ 00013 baff = pic.getc(); 00014 00015 for(;flug;flug--) 00016 RDATA = baff; 00017 00018 if(baff == ':') 00019 flug = 1; 00020 } 00021 00022 void setup(){ 00023 pic.baud(19200); 00024 pic.format(8,Serial::None,1); 00025 pic.attach(get,Serial::RxIrq); 00026 } 00027 00028 int main(){ 00029 setup(); 00030 while (true) { 00031 if(RDATA == '1') { 00032 myled = 0.2; 00033 }else if(RDATA == '9'){ 00034 myled=1; 00035 } 00036 } 00037 } 00038 00039
Generated on Fri Aug 26 2022 18:37:58 by
 1.7.2
 1.7.2