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: ADS1115 BME280 CronoDot SDFileSystem mbed
Fork of Outdoor_UPAS_v1_2_Tboard by
Revision 34:da333abe3476, committed 2016-04-27
- Comitter:
- caseyquinn
- Date:
- Wed Apr 27 02:57:13 2016 +0000
- Parent:
- 33:03d0e7f5ef0a
- Child:
- 35:e0bdd6389a75
- Commit message:
- changed adc gain for omron to 1 from 2 so range is now 4.096V
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Apr 25 21:32:27 2016 +0000
+++ b/main.cpp Wed Apr 27 02:57:13 2016 +0000
@@ -559,8 +559,8 @@
if(pumps == 1){
- omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
- omronVolt = (omronReading*4.096)/(32768*2);
+ omronReading = ads.readADC_SingleEnded(0, 0xC383); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
+ omronVolt = (omronReading*4.096)/(32768*1);
if(omronVolt<=calibrations.omronVMin) {
massflow = calibrations.omronMFMin;
@@ -613,8 +613,8 @@
{
//RGB_LED.set_led(0,1,0);
- omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
- omronVolt = (omronReading*4.096)/(32768*2);
+ omronReading = ads.readADC_SingleEnded(0, 0xC383); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
+ omronVolt = (omronReading*4.096)/(32768*1);
if(omronVolt<=calibrations.omronVMin) {
massflow = calibrations.omronMFMin;
@@ -917,8 +917,8 @@
fclose(fp);
- omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
- omronVolt = (omronReading*4.096)/(32768*2);
+ omronReading = ads.readADC_SingleEnded(0, 0xC383); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
+ omronVolt = (omronReading*4.096)/(32768*1);
if(omronVolt<=calibrations.omronVMin) {
massflow = calibrations.omronMFMin;
} else if(omronVolt>=calibrations.omronVMax) {
@@ -935,8 +935,8 @@
/*
while(abs(deltaMflow)>.025) {
- omronReading = ads.readADC_SingleEnded(0, 0xC583); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
- omronVolt = (omronReading*4.096)/(32768*2);
+ omronReading = ads.readADC_SingleEnded(0, 0xC383); // read channel 0 PGA = 2 : Full Scale Range = 2.048V
+ omronVolt = (omronReading*4.096)/(32768*1);
//Mass Flow tf from file: UPAS v2 OSU-PrimaryFlowData FullSet 2015-05-29 CQ mods.xlsx
if(omronVolt<=calibrations.omronVMin) {
massflow = calibrations.omronMFMin;
