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 mbed-http ESP8266
RGBLED.cpp
00001 #include "RGBLED.h" 00002 00003 RGBLed::RGBLed (PinName redpin, PinName greenpin, PinName bluepin) 00004 : _redpin(redpin), _greenpin(greenpin), _bluepin(bluepin) 00005 { 00006 //50Hz PWM clock default a bit too low, go to 2000Hz (less flicker) 00007 _redpin.period(0.0005); 00008 } 00009 00010 void RGBLed::write(float red,float green, float blue) 00011 { 00012 _redpin = red; 00013 _greenpin = green; 00014 _bluepin = blue; 00015 } 00016 //class could be moved to include file 00017 00018
Generated on Wed Dec 7 2022 02:06:01 by
1.7.2