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
Fork of circle_war_ver_A_NUCLEO_ by
transfer.h@14:3403ce49a37a, 2016-04-05 (annotated)
- Committer:
- baba2357
- Date:
- Tue Apr 05 17:25:09 2016 +0000
- Revision:
- 14:3403ce49a37a
- Parent:
- 8:554e3d643b2d
??????;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
baba2357 | 1:86d25c1c4bd5 | 1 | #ifndef TRANSFER_H |
baba2357 | 1:86d25c1c4bd5 | 2 | #define TRANSFER_H |
baba2357 | 14:3403ce49a37a | 3 | #include "pin_file.h" |
baba2357 | 1:86d25c1c4bd5 | 4 | DigitalIn push(PA_12); |
baba2357 | 1:86d25c1c4bd5 | 5 | bool pushed_number=0; |
baba2357 | 1:86d25c1c4bd5 | 6 | void transfer(); |
baba2357 | 1:86d25c1c4bd5 | 7 | |
baba2357 | 1:86d25c1c4bd5 | 8 | #endif |
baba2357 | 1:86d25c1c4bd5 | 9 | |
baba2357 | 1:86d25c1c4bd5 | 10 | void transfer(){ |
baba2357 | 8:554e3d643b2d | 11 | if(push.read()==0){ |
baba2357 | 8:554e3d643b2d | 12 | pushed_number=!pushed_number; |
baba2357 | 8:554e3d643b2d | 13 | wait(0.5); |
baba2357 | 8:554e3d643b2d | 14 | } |
baba2357 | 1:86d25c1c4bd5 | 15 | } |
baba2357 | 1:86d25c1c4bd5 | 16 | |
baba2357 | 1:86d25c1c4bd5 | 17 |