car chassis

Dependencies:   Servo mbed-rtos mbed

Committer:
mariob
Date:
Sun Aug 02 12:55:33 2015 +0000
Revision:
0:ce6055872f4e
Child:
1:79b1ee0f97ef
first commit: new car ECU

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mariob 0:ce6055872f4e 1 #include "mbed.h"
mariob 0:ce6055872f4e 2
mariob 0:ce6055872f4e 3 Ticker alive_ticker;
mariob 0:ce6055872f4e 4 DigitalOut alive_led(LED1);
mariob 0:ce6055872f4e 5
mariob 0:ce6055872f4e 6 void blink_led()
mariob 0:ce6055872f4e 7 {
mariob 0:ce6055872f4e 8 alive_led = !alive_led;
mariob 0:ce6055872f4e 9 }
mariob 0:ce6055872f4e 10
mariob 0:ce6055872f4e 11 void init_led ()
mariob 0:ce6055872f4e 12 {
mariob 0:ce6055872f4e 13 //alive blinking led - 1Hz
mariob 0:ce6055872f4e 14 alive_led = 0;
mariob 0:ce6055872f4e 15 alive_ticker.attach(blink_led, 1.0);
mariob 0:ce6055872f4e 16 }