BH1749 Class
Item Index
Methods
- BH1749
- Enable
- Disable
- CheckWhoAmI
- SensorInit
- SetOperatingMode
- GetOperatingMode
- SetMeasurementTime
- GetMeasurementTime
- SetRgbGain
- GetRgbGain
- SetIrGain
- GetIrGain
- SetIntSource
- GetInterruptSourceChar
- EnableInterrupt
- DisableInterrupt
- ResetInterrupt
- IsInterrupted
- IsInterruptEnabled
- SoftReset
- SetThresholdHigh
- GetThresholdHigh
- SetThresholdLow
- GetThresholdLow
- GetRed
- GetGreen
- GetBlue
- GetIr
- GetGeen2
- GetMeasurements
- InstallISR
- RemoveISR
- RegistersDump
Methods
BH1749
                      
                              - 
                                              bus
- 
                                              addr
This calls SensorInit() to set default values for operating mode, gains, measurement time, interrupt source and then sets threshold high to 511.
Parameters:
- 
                                              busNumberI2C bus number 
- 
                                              addrNumberI2C sensor address 
Returns:
Enable
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Disable
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          CheckWhoAmI
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          SensorInit
                      
                              - 
                                              opMode
- 
                                              measTime
- 
                                              rgbGain
- 
                                              irGain
- 
                                              intSource
Parameters:
- 
                                              opModeOPERATING_MODESOperating mode choice, a value of OPERATING_MODES enum 
- 
                                              measTimeMEAS_TIMESMeasurement time choice, a value of MEAS_TIMES enum 
- 
                                              rgbGainRGB_GAINSRGB gain choice, a value of RGB_GAINS enum 
- 
                                              irGainIR_GAINSIR gain choice, a value of IR_GAINS enum 
- 
                                              intSourceINT_SOURCESinterrupt source choice, a value of INT_SOURCES enum 
SetOperatingMode
                      
                              - 
                                              opMode
Parameters:
- 
                                              opModeOPERATING_MODESOperating mode choice, a value of OPERATING_MODES enum 
GetOperatingMode
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
operating mode value
SetMeasurementTime
                      
                              - 
                                              measTime
Parameters:
- 
                                              measTimeMEAS_TIMESmeasurement time choice, a value of MEAS_TIMES enum 
GetMeasurementTime
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
measurement time value
SetRgbGain
                      
                              - 
                                              rgbGain
Parameters:
- 
                                              rgbGainRGB_GAINSRGB gain choice, a value of RGB_GAINS enum 
GetRgbGain
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
RGB gain value value
SetIrGain
                      
                              - 
                                              irGain
Parameters:
- 
                                              irGainIR_GAINSIR gain choice, a value of IR_GAINS enum 
GetIrGain
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
IR gain value value
SetIntSource
                      
                              - 
                                              intSource
Parameters:
- 
                                              intSourceINT_SOURCESinterrupt source choice, a value of INT_SOURCES enum 
GetInterruptSourceChar
                      
                              ()
                      
                              
                                  String
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
interrupt source value
EnableInterrupt
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          DisableInterrupt
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          ResetInterrupt
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          IsInterrupted
                      
                              ()
                      
                              
                                  Boolean
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
true if interrupt is raised, otherwise false
IsInterruptEnabled
                      
                              ()
                      
                              
                                  Boolean
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
true if interrupt is enabled, otherwise false
SoftReset
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          SetThresholdHigh
                      
                              - 
                                              threshold
Parameters:
- 
                                              thresholdNumberinterrupt threshold high value, range 0-65536 
GetThresholdHigh
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
threshold high value
SetThresholdLow
                      
                              - 
                                              threshold
Parameters:
- 
                                              thresholdNumberinterrupt threshold low value, range 0-65536 
GetThresholdLow
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
threshold low value
GetRed
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
red channel value
GetGreen
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
green channel value
GetBlue
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
blue channel value
GetIr
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
ir channel value
GetGeen2
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
green2 channel value
GetMeasurements
                      
                              ()
                      
                              
                                  Std::vector uint16_t 
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
vector with all channels values ordered as: Red, Green, Blue, IR, Green2
InstallISR
                      
                              - 
                                              edge
- 
                                              pin
- 
                                              isr
- 
                                              isr_args
Parameters:
- 
                                              edgeMraa_gpio_edge_tEdge type to raise ISR with, of type mraa_gpio_edge_t 
- 
                                              pinNumberGPIO pin number 
- 
                                              isrFunctionPointer to ISR function 
- 
                                              isr_argsVoid *Arguments to pass the ISR function 
RemoveISR
                      
                              ()
                      
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          RegistersDump
                      
                              ()
                      
                              
                                  String
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns:
string of dumped registers