Driver for Me-Light Sensor module.
More...
#include <src/MeLightSensor.h>
Driver for Me-Light Sensor module.
Class: MeLightSensor
- Description
- Declaration of Class MeLightSensor.
- Copyright (C), 2012-2016, MakeBlock
◆ MeLightSensor() [1/2]
| MeLightSensor::MeLightSensor |
( |
void |
| ) |
|
Alternate Constructor which can call your own function to map the light sensor to arduino port, no pins are used or initialized here.
- Parameters
-
◆ MeLightSensor() [2/2]
| MeLightSensor::MeLightSensor |
( |
uint8_t |
port | ) |
|
Alternate Constructor which can call your own function to map the light sensor to arduino port
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
◆ lightOff()
| void MeLightSensor::lightOff |
( |
void |
| ) |
|
- Function
- lightOff
- Description
- Turn off the LED on the light sensor.
- Parameters
-
- Output
- None
- Return
- None
- Others
◆ lightOn()
| void MeLightSensor::lightOn |
( |
void |
| ) |
|
- Function
- lightOn
- Description
- Turn on the LED on the light sensor.
- Parameters
-
- Output
- None
- Return
- None
- Others
◆ read()
| int16_t MeLightSensor::read |
( |
void |
| ) |
|
- Function
- read
- Description
- Read analog value of light sensor.
- Parameters
-
- Output
- None
- Return
- MePort::aRead2() - DAC value of current light sensor's output.
- Others
◆ setpin()
| void MeLightSensor::setpin |
( |
uint8_t |
ledPin, |
|
|
uint8_t |
sensorPin |
|
) |
| |
- Function
- setpin
- Description
- Set I2C data pin, clock pin and clear display.
dataPin - the DATA pin for Seven-Segment LED module.
clkPin - the CLK pin for Seven-Segment LED module.
- Parameters
-
| [in] | ledPin | - Which pin on board that LEDpin is connecting to. |
| [in] | sensorPin | - Which pin on board that sensorPin is connecting to. |
- Output
- None
- Return
- None
- Others
- Set global variable _KeyPin and s2
The documentation for this class was generated from the following files: