Prototype for an ECE 395 Project

Dependencies:   MPU6050 mbed

Fork of HelloWorld by Simon Ford

Committer:
mikeyling18
Date:
Wed Nov 19 04:01:40 2014 +0000
Revision:
2:d0fab6ea5f45
Parent:
0:fb6bbc10ffa0
First Commit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:fb6bbc10ffa0 1 #include "mbed.h"
mikeyling18 2:d0fab6ea5f45 2 #include "MPU6050.h"
simon 0:fb6bbc10ffa0 3
mikeyling18 2:d0fab6ea5f45 4 Serial pc(USBTX, USBRX); // tx, rx
mikeyling18 2:d0fab6ea5f45 5
mikeyling18 2:d0fab6ea5f45 6 DigitalOut myled1(LED1);
mikeyling18 2:d0fab6ea5f45 7 DigitalOut myled2(LED2);
mikeyling18 2:d0fab6ea5f45 8 DigitalOut myled3(LED3);
mikeyling18 2:d0fab6ea5f45 9 DigitalOut myled4(LED4);
simon 0:fb6bbc10ffa0 10
simon 0:fb6bbc10ffa0 11 int main() {
simon 0:fb6bbc10ffa0 12 while(1) {
mikeyling18 2:d0fab6ea5f45 13 myled1 = 1;
mikeyling18 2:d0fab6ea5f45 14 pc.printf("On!\n");
mikeyling18 2:d0fab6ea5f45 15 wait(1);
mikeyling18 2:d0fab6ea5f45 16 myled1 = 0;
mikeyling18 2:d0fab6ea5f45 17 pc.printf("Off!\n");
mikeyling18 2:d0fab6ea5f45 18 wait(1);
simon 0:fb6bbc10ffa0 19 }
simon 0:fb6bbc10ffa0 20 }