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: TargetManager mbed
main.cpp
- Committer:
- dupm2216
- Date:
- 2017-03-12
- Revision:
- 6:07147a130219
- Parent:
- 5:e9c15bafd93f
- Child:
- 7:ca2863cba3ba
File content as of revision 6:07147a130219:
#include "mbed.h" #include "Bumper.hpp" #include "TargetHitCallback.hpp" #include "TargetManager.hpp" #include "TargetMissedCallback.hpp" #include "NerfusTicker.hpp" int main() { printf("Start TargetManager manual test\r\n"); PinName bumper_pin = p5; NerfusTicker target_timeout_ticker; TargetManager target_manager(target_timeout_ticker); TargetHitCallback target_hit_callback(target_manager, 42); TargetMissedCallback target_missed_callback(target_manager, 42); target_timeout_ticker.init(&target_missed_callback); Bumper bumper(bumper_pin, target_hit_callback); while(true) { target_timeout_ticker.start(500); wait_ms(1000); } }