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
GasArray.h
- Committer:
- nhardy6
- Date:
- 2016-06-28
- Revision:
- 1:fec4764e82cb
- Parent:
- 0:bd3708b85a8b
File content as of revision 1:fec4764e82cb:
#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
void tare(); // Adjusts base resistances for no gas
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
};
