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 // Switch on an LED if any of mbed pins 21-26 is high 00002 00003 #include "mbed.h" 00004 00005 PortIn p(Port2, 0x0000003F); // p21-p26 00006 DigitalOut ind(LED4); 00007 00008 int main() { 00009 while(1) { 00010 int pins = p.read(); 00011 if(pins) { 00012 ind = 1; 00013 } else { 00014 ind = 0; 00015 } 00016 } 00017 }
Generated on Tue Jul 12 2022 11:12:17 by
