Lab1
Dependencies: HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH
main.cpp@5:c5ccb1b07e8f, 2017-09-01 (annotated)
- Committer:
- umeume
- Date:
- Fri Sep 01 22:50:55 2017 +0000
- Revision:
- 5:c5ccb1b07e8f
- Parent:
- 2:1c5cdb2c3e0f
- Child:
- 6:a7d481b9d962
template
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
mbed_official | 0:bdbd3d6fc5d5 | 2 | #include "SDFileSystem.h" |
umeume | 2:1c5cdb2c3e0f | 3 | #include "HeptaXbee.h" |
umeume | 2:1c5cdb2c3e0f | 4 | #include "HeptaCamera_GPS.h" |
umeume | 2:1c5cdb2c3e0f | 5 | #include "Hepta9axis.h" |
umeume | 2:1c5cdb2c3e0f | 6 | #include "HeptaTemp.h" |
umeume | 2:1c5cdb2c3e0f | 7 | #include "HeptaBattery.h" |
umeume | 2:1c5cdb2c3e0f | 8 | |
umeume | 2:1c5cdb2c3e0f | 9 | Serial pc(USBTX,USBRX); |
umeume | 2:1c5cdb2c3e0f | 10 | SDFileSystem sd(p5, p6, p7, p8, "fs"); |
umeume | 2:1c5cdb2c3e0f | 11 | HeptaXbee xbee(p9,p10); |
umeume | 2:1c5cdb2c3e0f | 12 | HeptaCamera_GPS cam_gps(p13, p14,p25,p24); |
umeume | 2:1c5cdb2c3e0f | 13 | Hepta9axis _9axis(p28,p27,0xD0,0x18);//sda,scl,acc&gyro_address,mag_gyro |
umeume | 2:1c5cdb2c3e0f | 14 | HeptaTemp heptatemp(p17); |
umeume | 2:1c5cdb2c3e0f | 15 | HeptaBattery bat(p16,p26); |
umeume | 2:1c5cdb2c3e0f | 16 | |
umeume | 5:c5ccb1b07e8f | 17 | DigitalOut myled1(LED1); |
umeume | 5:c5ccb1b07e8f | 18 | DigitalOut myled2(LED1); |
umeume | 5:c5ccb1b07e8f | 19 | DigitalOut myled3(LED1); |
umeume | 5:c5ccb1b07e8f | 20 | DigitalOut myled4(LED1); |
umeume | 5:c5ccb1b07e8f | 21 | |
umeume | 2:1c5cdb2c3e0f | 22 | int main() |
umeume | 2:1c5cdb2c3e0f | 23 | { |
umeume | 5:c5ccb1b07e8f | 24 | //Lighting up |
umeume | 5:c5ccb1b07e8f | 25 | myled1 = 1; |
umeume | 5:c5ccb1b07e8f | 26 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 27 | myled2 = 1; |
umeume | 5:c5ccb1b07e8f | 28 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 29 | myled3 = 1; |
umeume | 5:c5ccb1b07e8f | 30 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 31 | myled4 = 1; |
umeume | 5:c5ccb1b07e8f | 32 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 33 | //Lighting off |
umeume | 5:c5ccb1b07e8f | 34 | myled1 = 0; |
umeume | 5:c5ccb1b07e8f | 35 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 36 | myled2 = 0; |
umeume | 5:c5ccb1b07e8f | 37 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 38 | myled3 = 0; |
umeume | 5:c5ccb1b07e8f | 39 | wait(0.5); |
umeume | 5:c5ccb1b07e8f | 40 | myled4 = 0; |
umeume | 2:1c5cdb2c3e0f | 41 | } |