all working version 2.0
Dependencies: ADS1115 BME280 CronoDot SDFileSystem mbed
Fork of Outdoor_UPAS_v1_2_powerfunction by
Revision 63:4bb4e27d057e, committed 2016-05-26
- Comitter:
- scottkelleher
- Date:
- Thu May 26 20:38:35 2016 +0000
- Parent:
- 62:d26214c68686
- Commit message:
- woking 6 sharp 2.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d26214c68686 -r 4bb4e27d057e main.cpp --- a/main.cpp Wed May 25 22:38:12 2016 +0000 +++ b/main.cpp Thu May 26 20:38:35 2016 +0000 @@ -73,7 +73,7 @@ int samplingTime = 280; int deltaTime = 40; -int sleepTime= 9680 +int sleepTime= 9680; int sharp1, sharp2, sharp3, sharp4, sharp5, sharp6; float sharpVolt1, sharpVolt2, sharpVolt3, sharpVolt4, sharpVolt5, sharpVolt6; //V @@ -125,49 +125,49 @@ wait_us(samplingTime); sharp1 = ads.readADC_SingleEnded(0, 0xC383); // read channel 1 sharpVolt1 = (sharp1*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp1LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); sharp2LED = 0; wait_us(samplingTime); sharp2 = ads.readADC_SingleEnded(1, 0xD383); // read channel 1 sharpVolt2 = (sharp2*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp2LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); sharp3LED = 0; wait_us(samplingTime); sharp3 = ads.readADC_SingleEnded(2, 0xE383); // read channel 1 sharpVolt3 = (sharp3*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp3LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); sharp4LED = 0; wait_us(samplingTime); sharp4 = ads.readADC_SingleEnded(3, 0xF383); // read channel 1 sharpVolt4 = (sharp4*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp4LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); sharp5LED = 0; wait_us(samplingTime); sharp5 = ads2.readADC_SingleEnded(0, 0xC383); // read channel 1 sharpVolt5 = (sharp5*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp5LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); sharp6LED = 0; wait_us(samplingTime); sharp6 = ads2.readADC_SingleEnded(0, 0xD383); // read channel 1 sharpVolt6 = (sharp6*4.096)/(32768*1); - wait_us(deltaTime) + wait_us(deltaTime); sharp6LED = 1; - wait_us(sleepTime) + wait_us(sleepTime); /* sharp1 = ads.readADC_SingleEnded(0, 0xC383); // read channel 1 @@ -336,7 +336,7 @@ wait_ms(100); } - logg.attach(&log_data, 3); + logg.attach(&log_data, 5);