Reference.EsploraReadLightSensor History

Hide minor edits - Show changes to output

December 07, 2012, at 11:03 PM by Scott Fitzgerald -
Changed lines 11-12 from:
readLightSensor()
to:
Esplora.readLightSensor()
Changed line 39 from:
(:sourceend:)
to:
(:sourceend:)
December 04, 2012, at 07:00 PM by Scott Fitzgerald -
Changed lines 7-8 from:
Read the analog value of the light sensor. It return a valure in the 0 - 1023 range.
to:
Reads the intensity of light hitting the light sensor as a 10-bit number. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit.
Changed lines 19-21 from:
The light sensor reading in the range from 0 to 1023.

to:
int : The amount of light hitting the sensor, mapped to a value between 0 and 1023.

Changed lines 23-24 from:

[@
to:
(:source lang=arduino tabwidth=4:)
Changed line 28 from:
Serial.begin(9600);
to:
Serial.begin(9600);
Changed line 30 from:
to:
Changed lines 33-38 from:
int value = Esplora.readLightSensor();
Serial.println(value);

delay(1000);
}
@]
to:
int value = Esplora.readLightSensor();
Serial.println(value);

delay(1000);
}

(:sourceend:)
December 03, 2012, at 04:19 PM by Federico -
Added lines 1-39:
[[EsploraLibrary | Esplora]]

!!readLightSensor()

!!!!Description

Read the analog value of the light sensor. It return a valure in the 0 - 1023 range.

!!!!Syntax

readLightSensor()

!!!!Parameters

none

!!!!Returns

The light sensor reading in the range from 0 to 1023.


!!!!Example

[@
#include <Esplora.h>

void setup()
{
Serial.begin(9600);
}

void loop()
{
int value = Esplora.readLightSensor();
Serial.println(value);

delay(1000);
}
@]

Share