6 sharps, 2 ads hooked up
Dependencies: ADS1115 BME280 CronoDot SDFileSystem mbed
Fork of Outdoor_UPAS_v1_2_Tboard by
Diff: main.cpp
- Revision:
- 24:e274a34492cf
- Parent:
- 23:1ca41779b8ec
- Child:
- 25:fbf7d44e7da4
--- a/main.cpp Mon Mar 28 02:54:17 2016 +0000 +++ b/main.cpp Thu Apr 07 00:32:31 2016 +0000 @@ -77,14 +77,16 @@ //Hbridge Valve Control ///////////////////////////////////////////// -DRV8830 motor1(PB_9, PB_8, 0xCA); //Not working with 0xC4 will remove R28 and try 0xCA +/* +DRV8830 motor1(PB_9, PB_8, 0xC4); //Not working due to trace issue on tboard DRV8830 motor2(PB_9, PB_8, 0xC8); //Works with 0xC8, not 0xCA since R8 isn't on the Tboards. -DRV8830 motor3(PB_9, PB_8, 0xCC); //Not working with 0xCC might try replacing R15 with a 0 ohm resistor and try again. +DRV8830 motor3(PB_9, PB_8, 0xCC); //Not working due to trace issue on tboard DRV8830 motor4(PB_9, PB_8, 0xCE); //Works! DigitalIn hb_fault1(PA_6); DigitalIn hb_fault2(PA_7); DigitalIn hb_fault3(PA_5); DigitalIn hb_fault4(PA_4); +*/ ///////////////////////////////////////////// //SD Card @@ -529,7 +531,7 @@ fprintf(fp, "%.1f,%.1f,%.1f,%.3f,%.3f,%.3f,%.1f,", angle_x,angle_y,angle_z,mag_x, mag_y, mag_z,compass); fprintf(fp, "%d,%d,%d,%d,%d,%d," ,uv,omronReading, vInReading, vBlowerReading, omronDiff,gasG.getAmps()); fprintf(fp, "%d,%d,%d,%1.3f,%1.3f,", gasG.getVolts(), gasG.getCharge(),digital_pot_set, deltaMflow, deltaVflow); - fprintf(fp, "%f,%f,%06d,%06d,%f,%d,%f,%d,%f\r\n", gps.lat, gps.lon, (long)gps.date, (long)gps.utc, gpsspeed, gpssatellites, gpsaltitude, gpsFix, gps.hdop); // test and add in speed, etc that Josh added in to match the adafruit GPS + fprintf(fp, "%f,%f,%06d,%06d,%f,%d,%f,%d\r\n", gps.lat, gps.lon, (long)gps.date, (long)gps.utc, gpsspeed, gpssatellites, gpsaltitude, gpsFix); // test and add in speed, etc that Josh added in to match the adafruit GPS fclose(fp); free(fp); RGB_LED.set_led(0,1,0); @@ -623,7 +625,7 @@ set_time(seconds); // Set RTC time to 16 December 2013 10:05:23 UTC wait(5); -*/ + motor1.getFault(); wait(1); @@ -640,7 +642,7 @@ wait(1); RGB_LED.set_led(0,1,0); -/* + RGB_LED.set_led(1,0,0); motor1.drive(254); //closed = 253, open = 254 wait(10); @@ -664,7 +666,7 @@ motor4.stop(); RGB_LED.set_led(0,0,1); -*/ + motor1.drive(254); //closed = 253, open = 254 motor2.drive(254); //closed = 253, open = 254 @@ -677,6 +679,7 @@ motor2.stop(); motor3.stop(); motor4.stop(); +*/ gpsEN = 1;