#include <Obstacle-Sensor-SOLDERED.h>
Inherits EasyC.
|
bool | digitalRead () |
| Sensor specific native constructor.
|
|
uint16_t | analogRead () |
| Returns analog value of sensor.
|
|
void | setTreshold (uint16_t value) |
| Sets treshold for turning on integrated L0 LED on breakout.
|
|
uint16_t | getTreshold (void) |
| Sets treshold for turning on integrated L0 LED on breakout.
|
|
bool | available () |
| Function which checks if I2C device is responding.
|
|
| EasyC () |
| Main constructor for easyC version.
|
|
void | begin () |
| Initializes sensors on native or easyC on default address.
|
|
void | begin (uint8_t _address) |
| Initializes sensors on supplied i2c address.
|
|
int | sendAddress (char regAddr) |
| Private function to send a single byte to sensor.
|
|
int | readData (char a[], int n) |
| Private function to read n bytes over i2c.
|
|
int | readRegister (char regAddr, char a[], size_t n) |
| Private function to send over i2c and then read n bytes.
|
|
int | sendData (const uint8_t *a, int n) |
| Private function to write n bytes over i2c.
|
|
◆ analogRead()
uint16_t Obstacle_Sensor::analogRead |
( |
| ) |
|
Returns analog value of sensor.
- Returns
- int Analog value of sensor.
◆ available()
bool Obstacle_Sensor::available |
( |
| ) |
|
Function which checks if I2C device is responding.
- Returns
- 1 if device is responding, 0 if not
◆ digitalRead()
bool Obstacle_Sensor::digitalRead |
( |
| ) |
|
Sensor specific native constructor.
- Parameters
-
int | _pin Example parameter. |
Overloaded function for virtual in base class to initialize sensor specific.
Returns digital value of sensor.
- Returns
- bool Digital value of sensor.
◆ getTreshold()
uint16_t Obstacle_Sensor::getTreshold |
( |
void | | ) |
|
Sets treshold for turning on integrated L0 LED on breakout.
◆ initializeNative()
void Obstacle_Sensor::initializeNative |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ setTreshold()
void Obstacle_Sensor::setTreshold |
( |
uint16_t | value | ) |
|
Sets treshold for turning on integrated L0 LED on breakout.
◆ pin
◆ treshold
uint16_t Obstacle_Sensor::treshold = 127 |
|
private |
◆ val
uint16_t Obstacle_Sensor::val |
|
private |
The documentation for this class was generated from the following files: