This code enables our mouse to go round the track using the two error methods.

Dependencies:   Nucleo_blink_led mbed

Fork of Nucleo_blink_led by Jamie Bignell

Committer:
JamieBignell
Date:
Sun Feb 25 21:10:05 2018 +0000
Revision:
0:c0c329729a7a
Child:
3:7f44ab64e96b
first try;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JamieBignell 0:c0c329729a7a 1 #include "mbed.h"
JamieBignell 0:c0c329729a7a 2 #include "funcdef.h"
JamieBignell 0:c0c329729a7a 3
JamieBignell 0:c0c329729a7a 4 DigitalOut myled(LED1);
JamieBignell 0:c0c329729a7a 5
JamieBignell 0:c0c329729a7a 6 int main() {
JamieBignell 0:c0c329729a7a 7 while(1) {
JamieBignell 0:c0c329729a7a 8 myled = 1; // LED is ON
JamieBignell 0:c0c329729a7a 9 wait(0.2); // 200 ms
JamieBignell 0:c0c329729a7a 10 myled = 0; // LED is OFF
JamieBignell 0:c0c329729a7a 11 wait(1.0); // 1 sec
JamieBignell 0:c0c329729a7a 12 }
JamieBignell 0:c0c329729a7a 13 void func(void);
JamieBignell 0:c0c329729a7a 14 }