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:
Tue Jun 28 18:58:40 2016 +0000
Revision:
1:fec4764e82cb
Parent:
0:bd3708b85a8b
finished tare button

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 1:fec4764e82cb 12 void tare(); // Adjusts base resistances for no gas
nhardy6 0:bd3708b85a8b 13 private:
nhardy6 0:bd3708b85a8b 14 int number; // Number of sensors
nhardy6 0:bd3708b85a8b 15 float * baseR; // Base resistance of sensors
nhardy6 0:bd3708b85a8b 16 float pwrV; // Store total voltage across divider
nhardy6 0:bd3708b85a8b 17 float * dividerR; // Voltage divider resistors
nhardy6 0:bd3708b85a8b 18 AnalogIn * pins; // Pins 15-20
nhardy6 0:bd3708b85a8b 19 float * responseV; // Store sensors' response voltages
nhardy6 0:bd3708b85a8b 20 float * sensorR; // Store sensors' responses
nhardy6 0:bd3708b85a8b 21 float * InverseSensitivity; // Inverse sensitivity matrix
nhardy6 0:bd3708b85a8b 22 string * types; // Sensor types
nhardy6 0:bd3708b85a8b 23 string * gases; // List of gas for display
nhardy6 0:bd3708b85a8b 24 float * percentages; // Store gas percentages
nhardy6 0:bd3708b85a8b 25 };