Arduino TKJHAT
Arduino library for Pico HAT extension board
Loading...
Searching...
No Matches
Lightsensor.h
1
#ifndef TKJHAT_LIGHTSENSOR_H
2
#define TKJHAT_LIGHTSENSOR_H
3
4
#include <Arduino.h>
5
#include <Wire.h>
6
32
33
34
class
LightSensor
{
35
private
:
36
uint8_t sdapin;
37
uint8_t sclpin;
38
39
public
:
40
46
LightSensor
(uint8_t sdapin, uint8_t sclpin);
47
58
void
begin
();
59
64
uint32_t
readLight
();
65
70
void
stop
();
71
};
72
77
#endif
LightSensor::stop
void stop()
Stop the sensor.
LightSensor::begin
void begin()
Initialize the VEML6030 light sensor.
LightSensor::readLight
uint32_t readLight()
Read the current light level in lux.
LightSensor::LightSensor
LightSensor(uint8_t sdapin, uint8_t sclpin)
Construct a new LightSensor object.
src
Lightsensor.h
Generated by
1.16.1