Arduino Toolkit - arduinosensor.GUVAS12SD


: arduinosensor.GUVAS12SD

A thin wrapper for the GUVAS12SD analog UV-B sensor

Methods

: obj = GUVAS12SD(arObj, pin)

Constructor to create GUVAS12SD sensor

Inputs

arObj - the arduino parent object

pin - the analog pin that the sensor is connected to

Outputs

obj - created GUVAS12SD object

Example

 
 a = arduino()
 # create sensor attached to pin a0.
 sensor = arduinosensor.GUVAS12SD(a, "a0")
 
 
: V = read(dsObj)

Read the voltage of the sensor

Inputs

dsObj - the GUVAS12SD object

Outputs

V - read voltage - effectively equivalent to readAnalogPin(arObj, pin).

Example

 
 a = arduino()
 s = arduinosensor.GUVAS12SD(a)
 # voltage
 volts = s.read
 
 

See also: arduinosensor.GUVAS12SD.

: Idx = readIndex(dsObj)

Read the UV index

Inputs

dsObj - the GUVAS12SD object

Outputs

Idx - the sensor reading as a UV index reading

: uA = readuA(dsObj)

Read the uA of the sensor

Inputs

dsObj - the GUVAS12SD object

Outputs

uA - the sensor reading as a uAmp value