MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4VernierLib.h
Go to the documentation of this file.
1
6#ifndef MiniR4VernierLib_h
7# define MiniR4VernierLib_h
8# include <math.h>
9# define VERNIERLIB_LIB_VERSION "1.0.6" // displayed automatically
10
18{
19public:
21
22 void autoID(); // this is the function for the autoID code
23 // it returns calibration information
24 int channel() { return _channel; };
25 float voltageID() { return _voltageID; };
26 int sensorNumber() { return _sensorNumber; };
27 char* sensorName() { return _sensorName; };
28 char* shortName() { return _shortName; };
29 char* sensorUnits() { return _sensorUnits; };
30 float slope() { return _slope; };
31 float intercept() { return _intercept; };
32 float cFactor() { return _cFactor; };
34 int page() { return _page; };
35
36 float readSensor(); // This function converts count to sensor reading
37 float sensorReading() { return _sensorReading; };
38
39 void DCUPWM(int PWMSetting); // function to control PWM via the DCU, line 4 (Arduino line 9)
40
41 void DCU(int DCUSetting); // function for controlling a DCU
42
43 void DCUStep(int stepCount, int stepDirection, int stepDelay); // function for stepper motors
44
45 float readMotionDetector(); // function for Motion Detectors
46 float distance() { return _distance; };
47
48protected: // also known as local
52 char _sensorName[16];
53 char _shortName[12]; // 11 char + terminator
54 char _sensorUnits[7];
55 float _slope;
56 float _sum;
58 float _cFactor;
60 int _page;
62 float _distance;
63 // this misc. variable is used many places
64 int _i;
65};
66#endif
67
68// END OF FILE
A library for interfacing with Vernier sensors.
void DCUStep(int stepCount, int stepDirection, int stepDelay)
void DCUPWM(int PWMSetting)
void DCU(int DCUSetting)