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 #include "PCAL9555.h" 00003 00004 PCAL9555 gpio_exp(SDA, SCL); 00005 GpioBusOut leds(gpio_exp, X1_4, X1_5, X1_6, X1_7); 00006 00007 enum key_num { 00008 OM13082_LD1 = (1 << 0), 00009 OM13082_LD2 = (1 << 1), 00010 OM13082_LD3 = (1 << 2), 00011 OM13082_LD4 = (1 << 3), 00012 }; 00013 00014 int main() 00015 { 00016 while(1) { 00017 leds.write(0xF); 00018 wait(0.3); 00019 leds.write(~OM13082_LD1); 00020 wait(0.3); 00021 leds.write(~OM13082_LD2); 00022 wait(0.3); 00023 leds.write(~OM13082_LD3); 00024 wait(0.3); 00025 leds.write(~OM13082_LD4); 00026 wait(0.3); 00027 } 00028 } 00029
Generated on Tue Jul 12 2022 18:43:14 by
