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.
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem_OldbutworkswithRTOS
RGBLed.cpp
00001 #include "RGBLed.h" 00002 #include "mbed.h" 00003 00004 RGBLed::RGBLed (PinName redpin, PinName greenpin, PinName bluepin) 00005 : _redpin(redpin), _greenpin(greenpin), _bluepin(bluepin) 00006 { 00007 //50Hz PWM clock default a bit too low, go to 2000Hz (less flicker) 00008 _redpin.period(0.0005); 00009 } 00010 00011 void RGBLed::write(float red,float green, float blue) 00012 { 00013 _redpin = red; 00014 _greenpin = green; 00015 _bluepin = blue; 00016 }
Generated on Fri Jul 15 2022 04:49:16 by
1.7.2