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 "PCA9624.h" 00003 00004 PCA9624 led_cntlr( p28, p27, 0x3E ); // SDA, SCL, Slave_address(option) 00005 LedPwmOut led0( led_cntlr, L0 ); // Instance for LED0 pin 00006 LedPwmOut led1( led_cntlr, L1 ); // Instance for LED1 pin 00007 LedPwmOut led2( led_cntlr, L2 ); // Instance for LED2 pin 00008 00009 int main() 00010 { 00011 while(1) { 00012 00013 for ( float p = 1.0; p >= 0.0; p -= 0.01 ) { 00014 led0 = p; // Set LED0 output PWM dutycycle as 'p' 00015 wait( 0.01 ); 00016 } 00017 00018 for ( float p = 1.0; p >= 0.0; p -= 0.01 ) { 00019 led1 = p; // Set LED1 output PWM dutycycle as 'p' 00020 wait( 0.01 ); 00021 } 00022 00023 for ( float p = 1.0; p >= 0.0; p -= 0.01 ) { 00024 led2 = p; // Set LED2 output PWM dutycycle as 'p' 00025 wait( 0.01 ); 00026 } 00027 } 00028 }
Generated on Thu Jul 21 2022 21:53:31 by
1.7.2