Neil Hardy / Mbed 2 deprecated Gas_Sensor_Array

Dependencies:   4DGL-uLCD-SE mbed

Fork of Gas_Sensor_best_copy by Neil Hardy

Committer:
nhardy6
Date:
Thu Jun 16 21:59:31 2016 +0000
Revision:
0:bd3708b85a8b
Child:
1:fec4764e82cb
updated as of 6/16/16

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nhardy6 0:bd3708b85a8b 1 #include "mbed.h"
nhardy6 0:bd3708b85a8b 2 #include "uLCD_4DGL.h"
nhardy6 0:bd3708b85a8b 3 #include <string>
nhardy6 0:bd3708b85a8b 4
nhardy6 0:bd3708b85a8b 5 class GasArray
nhardy6 0:bd3708b85a8b 6 {
nhardy6 0:bd3708b85a8b 7 public:
nhardy6 0:bd3708b85a8b 8 GasArray(int, float[], float, float[], AnalogIn[], float[], string[], string[]);
nhardy6 0:bd3708b85a8b 9 void read(); // Returns voltage values
nhardy6 0:bd3708b85a8b 10 void display_init(uLCD_4DGL *uLCD); // Prints sensor types and gases
nhardy6 0:bd3708b85a8b 11 void display_cont(uLCD_4DGL *uLCD); // Prints response and gas percentages
nhardy6 0:bd3708b85a8b 12 private:
nhardy6 0:bd3708b85a8b 13 int number; // Number of sensors
nhardy6 0:bd3708b85a8b 14 float * baseR; // Base resistance of sensors
nhardy6 0:bd3708b85a8b 15 float pwrV; // Store total voltage across divider
nhardy6 0:bd3708b85a8b 16 float * dividerR; // Voltage divider resistors
nhardy6 0:bd3708b85a8b 17 AnalogIn * pins; // Pins 15-20
nhardy6 0:bd3708b85a8b 18 float * responseV; // Store sensors' response voltages
nhardy6 0:bd3708b85a8b 19 float * sensorR; // Store sensors' responses
nhardy6 0:bd3708b85a8b 20 float * InverseSensitivity; // Inverse sensitivity matrix
nhardy6 0:bd3708b85a8b 21 string * types; // Sensor types
nhardy6 0:bd3708b85a8b 22 string * gases; // List of gas for display
nhardy6 0:bd3708b85a8b 23 float * percentages; // Store gas percentages
nhardy6 0:bd3708b85a8b 24 };