![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is car control simulation by using Mbed controller and real time operating system.
Dependencies: MCP23017 Servo WattBob_TextLCD mbed-rtos mbed
Fork of Ass3 by
main.cpp@0:68ce46607848, 2014-04-02 (annotated)
- Committer:
- muaiyd
- Date:
- Wed Apr 02 09:13:57 2014 +0000
- Revision:
- 0:68ce46607848
- Child:
- 1:b409ad65466a
First RTOS with Class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
muaiyd | 0:68ce46607848 | 1 | #include "CAR.h" |
muaiyd | 0:68ce46607848 | 2 | |
muaiyd | 0:68ce46607848 | 3 | int main() { |
muaiyd | 0:68ce46607848 | 4 | Port.write_bit(1,BL_BIT); |
muaiyd | 0:68ce46607848 | 5 | CAR CAR1; |
muaiyd | 0:68ce46607848 | 6 | void const *args; |
muaiyd | 0:68ce46607848 | 7 | Thread thread(CAR1.led2_thread); |
muaiyd | 0:68ce46607848 | 8 | |
muaiyd | 0:68ce46607848 | 9 | while (true) { |
muaiyd | 0:68ce46607848 | 10 | led1 = !led1; |
muaiyd | 0:68ce46607848 | 11 | Thread::wait(100); |
muaiyd | 0:68ce46607848 | 12 | } |
muaiyd | 0:68ce46607848 | 13 | } |