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: mbed MATSUbed USBDevice
main.cpp@1:f3d4794ec7a4, 2018-11-26 (annotated)
- Committer:
- Tiryoh
- Date:
- Mon Nov 26 08:23:27 2018 +0000
- Revision:
- 1:f3d4794ec7a4
- Parent:
- 0:41789135608a
- Child:
- 2:f44ab60c5c27
Add MATSU-bed.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Tiryoh | 0:41789135608a | 1 | #include "mbed.h" |
Tiryoh | 0:41789135608a | 2 | #include "USBSerial.h" |
Tiryoh | 1:f3d4794ec7a4 | 3 | #include "MATSU-bed.h" |
Tiryoh | 0:41789135608a | 4 | |
Tiryoh | 0:41789135608a | 5 | USBSerial pc; |
Tiryoh | 0:41789135608a | 6 | BusOut myled(LED1, LED2, LED3, LED4); |
Tiryoh | 0:41789135608a | 7 | |
Tiryoh | 0:41789135608a | 8 | //DigitalIn sw1(ISP0); |
Tiryoh | 0:41789135608a | 9 | //DigitalIn sw2(ISP1); |
Tiryoh | 0:41789135608a | 10 | |
Tiryoh | 0:41789135608a | 11 | int main() { |
Tiryoh | 0:41789135608a | 12 | myled = 0b0000; |
Tiryoh | 0:41789135608a | 13 | while(pc.readable() == 0); |
Tiryoh | 0:41789135608a | 14 | pc.printf("KEY DETECTED!!\r\nPROGRAM START\r\n"); |
Tiryoh | 0:41789135608a | 15 | while(1){ |
Tiryoh | 0:41789135608a | 16 | pc.printf("program running...\r\n"); |
Tiryoh | 0:41789135608a | 17 | myled = 0b0001; |
Tiryoh | 0:41789135608a | 18 | wait(0.5); |
Tiryoh | 0:41789135608a | 19 | myled = 0b0000; |
Tiryoh | 0:41789135608a | 20 | wait(0.5); |
Tiryoh | 0:41789135608a | 21 | } |
Tiryoh | 0:41789135608a | 22 | } |