Package crackers.kobots.devices
        Class AnodeRgbPwmLed
- 
                    
                    
- All Implemented Interfaces:
 - 
                            
                            
com.diozero.api.DeviceInterface,java.lang.AutoCloseable 
public final class AnodeRgbPwmLed implements DeviceInterfaceRGB LED with common anode - this is inverted from RgbPwmLed. Provides the same interface.
Basically, the LED pins are initially high and when the anode is high, the light is off.
 
- 
                
                    
                    
- 
                                
                            
                                
Constructor Summary
Constructors Constructor Description AnodeRgbPwmLed(Integer redPin, Integer greenPin, Integer bluePin, PwmOutputDeviceFactoryInterface deviceFactory)AnodeRgbPwmLed(Integer redPin, Integer greenPin, Integer bluePin) 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final FloatArraygetValues()Get the value of all LEDs. final UnitsetValues(Float red, Float green, Float blue)Set the value of all LEDs. final UnitsetColor(Color color)Sets the Color of all the LEDs. final Uniton()Turn all LEDs on. final Unitoff()Turn all LEDs off. final Unittoggle()Toggle the state of all LEDs. Unitclose()- 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
getValues
final FloatArray getValues()
Get the value of all LEDs.
 
- 
                                        
setValues
final Unit setValues(Float red, Float green, Float blue)
Set the value of all LEDs.
- Parameters:
 red- Red LED value (0..1).green- Green LED value (0..1).blue- Blue LED value (0..1).
 
- 
                                        
setColor
final Unit setColor(Color color)
Sets the Color of all the LEDs.
- Parameters:
 color- The color to set
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -