![]() |
Rock Monitoring
V 1.0
|
Class that handles sensors. More...
#include <Sensors.h>

Classes | |
| struct | structSensors |
| struct | structSensorsPitchRoll |
| struct | structSensorsXYZ |
Public Member Functions | |
| Sensors () | |
| void | init () |
| This method initializes the sensors. More... | |
| uint8_t | getSensorAcc123 (Sensors::structSensorsXYZ *sensors123) |
| This method gives back the X, Y and Z - Values of all 3 Accelerometers. More... | |
| uint8_t | getSensorValues (Sensors::structSensors *allSensors) |
| This method reads the pitch and Roll Angle- Values of all 3 Accelerometers, all 3 temperatures and the extension It reads the temperatures and accelerations as 16bit int but concluding 2 places after comma the extension is given in 8 bit concluding the data in 1/10 mm. More... | |
| void | print () |
| This method reads the X, Y and Z - Values of all 3 Accelerometers and the extensiomter and prints them to the serial Port. More... | |
| void | printAll () |
| This method reads all the sensors and prints them to the serial Port. More... | |
| void | getExtension (int &extension) |
| This method reads the Extension of the potentiometer, it uses the 10Bit- ADC Converter it calculates the extension in 1/10 mm with the median value of 30 measurements. More... | |
| void | goToSleep () |
| This method sets all sensors in Standby. More... | |
| void | wakeUp () |
| This method is used to wake up the Sensors, it initializes them. More... | |
Private Member Functions | |
| int | median (int n, int x[]) |
| This method calculates the median value of the elements in the array. More... | |
Private Attributes | |
| FXLS8471Q | acc1 |
| FXLS8471Q | acc2 |
| FXLS8471Q | acc3 |
| PCT2075 | temp1 |
| PCT2075 | temp2 |
| PCT2075 | temp3 |
| Sensors::Sensors | ( | ) |
Definition at line 6 of file Sensors.cpp.
| void Sensors::getExtension | ( | int & | extension | ) |
This method reads the Extension of the potentiometer, it uses the 10Bit- ADC Converter
it calculates the extension in 1/10 mm with the median value of 30 measurements.
| int | & extension, Reference to int which contains the extension value (from 0 - 1023) |
Definition at line 265 of file Sensors.cpp.
| uint8_t Sensors::getSensorAcc123 | ( | Sensors::structSensorsXYZ * | sensors123 | ) |
This method gives back the X, Y and Z - Values of all 3 Accelerometers.
| Sensors::structSensorsXYZ | * sensors123, Pointer to struct which contains data of all 3 acc. sensors |
Definition at line 35 of file Sensors.cpp.
| uint8_t Sensors::getSensorValues | ( | Sensors::structSensors * | allsensors | ) |
This method reads the pitch and Roll Angle- Values of all 3 Accelerometers, all 3 temperatures and the extension
It reads the temperatures and accelerations as 16bit int but concluding 2 places after comma
the extension is given in 8 bit concluding the data in 1/10 mm.
| Sensors::structSensorsPitchRoll | * sensors123, Pointer to struct which contains angle data of all 3 acc. sensors |
Definition at line 77 of file Sensors.cpp.
| void Sensors::goToSleep | ( | ) |
This method sets all sensors in Standby.
Definition at line 278 of file Sensors.cpp.
| void Sensors::init | ( | void | ) |
This method initializes the sensors.
Definition at line 15 of file Sensors.cpp.
|
private |
This method calculates the median value of the elements in the array.
| int | n, int x[], n = number of values in the array, x = array with values |
Definition at line 299 of file Sensors.cpp.
| void Sensors::print | ( | ) |
This method reads the X, Y and Z - Values of all 3 Accelerometers and the extensiomter and prints them to the serial Port.
Definition at line 161 of file Sensors.cpp.
| void Sensors::printAll | ( | ) |
This method reads all the sensors and prints them to the serial Port.
Definition at line 212 of file Sensors.cpp.
| void Sensors::wakeUp | ( | void | ) |
This method is used to wake up the Sensors, it initializes them.
Definition at line 289 of file Sensors.cpp.