Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed
Fork of Gas_Sensor_best_copy by
Diff: GasArray.h
- Revision:
- 0:bd3708b85a8b
- Child:
- 1:fec4764e82cb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/GasArray.h Thu Jun 16 21:59:31 2016 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "uLCD_4DGL.h"
+#include <string>
+
+class GasArray
+{
+ public:
+ GasArray(int, float[], float, float[], AnalogIn[], float[], string[], string[]);
+ void read(); // Returns voltage values
+ void display_init(uLCD_4DGL *uLCD); // Prints sensor types and gases
+ void display_cont(uLCD_4DGL *uLCD); // Prints response and gas percentages
+ private:
+ int number; // Number of sensors
+ float * baseR; // Base resistance of sensors
+ float pwrV; // Store total voltage across divider
+ float * dividerR; // Voltage divider resistors
+ AnalogIn * pins; // Pins 15-20
+ float * responseV; // Store sensors' response voltages
+ float * sensorR; // Store sensors' responses
+ float * InverseSensitivity; // Inverse sensitivity matrix
+ string * types; // Sensor types
+ string * gases; // List of gas for display
+ float * percentages; // Store gas percentages
+};
\ No newline at end of file
