HEPTA-Sat Training 2020
/
Lab5-01_count_up_xbee
main.cpp@26:069145e20770, 2019-08-27 (annotated)
- Committer:
- HeptaSatTraining2019
- Date:
- Tue Aug 27 02:18:10 2019 +0000
- Revision:
- 26:069145e20770
- Parent:
- 25:5fd40a170032
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
HeptaSatTraining2019 | 25:5fd40a170032 | 2 | #include "HEPTA_COM.h" |
umeume | 2:1c5cdb2c3e0f | 3 | |
umeume | 2:1c5cdb2c3e0f | 4 | Serial pc(USBTX,USBRX); |
HeptaSatTraining2019 | 21:92c25e853b87 | 5 | HEPTA_COM com(p9,p10); |
umeume | 2:1c5cdb2c3e0f | 6 | |
umeume | 2:1c5cdb2c3e0f | 7 | int main() |
umeume | 2:1c5cdb2c3e0f | 8 | { |
HeptaSatTraining2019 | 26:069145e20770 | 9 | pc.baud(9600); |
HeptaSatTraining2019 | 26:069145e20770 | 10 | com.baud(9600); |
HeptaSatTraining2019 | 26:069145e20770 | 11 | pc.printf("Xbee Count Up Mode\r\n"); |
HeptaSatTraining2019 | 26:069145e20770 | 12 | for(int i = 0; i < 10; i++) { |
HeptaSatTraining2019 | 26:069145e20770 | 13 | com.printf("num = %d\r\n",i); |
HeptaSatTraining2019 | 26:069145e20770 | 14 | wait(1.0); |
HeptaSatTraining2019 | 26:069145e20770 | 15 | } |
umeume | 2:1c5cdb2c3e0f | 16 | } |