RGB LED (PWM)
Dependents: FRDM-KL46Z_SENSORDIG_HUMTEMP
RGBLed.cpp
- Committer:
- MayraPeA
- Date:
- 2019-05-31
- Revision:
- 0:627ea7b55fe3
File content as of revision 0:627ea7b55fe3:
#include "mbed.h" #include "RGBLed.h" RGBLed::RGBLed (PinName redpin, PinName greenpin, PinName bluepin) : _redpin(redpin), _greenpin(greenpin), _bluepin(bluepin) { _redpin.period(0.0005); } void RGBLed::write(float red,float green, float blue) { _redpin = red; _greenpin = green; _bluepin = blue; }