ArduSat API
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SAT_Lum Class Reference

#include <SAT_Lum.h>

Public Member Functions

 SAT_Lum (uint8_t addr)
 
boolean begin (uint8_t nodeid)
 
void enable (void)
 
void disable (void)
 
void write8 (uint8_t r, uint8_t v)
 
uint16_t read16 (uint8_t reg)
 
uint32_t calculateLux (uint16_t ch0, uint16_t ch1)
 
void setTiming (tsl2561IntegrationTime_t integration)
 
void setGain (tsl2561Gain_t gain)
 
uint16_t getLuminosity (uint8_t channel)
 
uint32_t getFullLuminosity ()
 

Constructor & Destructor Documentation

SAT_Lum::SAT_Lum ( uint8_t  addr)

Constructor that has a single ID parameter.

Parameters
addr- The address of the luminousity sensor.

Member Function Documentation

boolean SAT_Lum::begin ( uint8_t  nodeid)

Initializes the luminousity sensor.

Parameters
nodeid- The id of the user's arduino on the ArduSat. This allows the supervisor to know which arduino node to send the data back to. The id is assigned by NanoSatisfi.
uint32_t SAT_Lum::calculateLux ( uint16_t  ch0,
uint16_t  ch1 
)

Calculates the Lux on the light sensor.

void SAT_Lum::disable ( void  )
void SAT_Lum::enable ( void  )
uint32_t SAT_Lum::getFullLuminosity ( )

Gets the Full Spectrum Luminosity from the light sensor.

uint16_t SAT_Lum::getLuminosity ( uint8_t  channel)

Gets the Luminosity from the light sensor.

uint16_t SAT_Lum::read16 ( uint8_t  reg)
void SAT_Lum::setGain ( tsl2561Gain_t  gain)

Sets the gain on the light sensor. This may help in dim or bright situations.

Parameters
gain-SAT_Lum_GAIN_16X for low light. SAT_Lum_GAIN_0X for bright situations.
void SAT_Lum::setTiming ( tsl2561IntegrationTime_t  integration)

Sets the timing on the light sensor. This is essentially an exposure value.

Parameters
integration- SAT_Lum_INTEGRATIONTIME_13MS (shortest) SAT_Lum_INTEGRATIONTIME_101MS (medium) SAT_Lum_INTEGRATIONTIME_402MS (longest)
void SAT_Lum::write8 ( uint8_t  r,
uint8_t  v 
)

The documentation for this class was generated from the following file: