f

Dependencies:   mbed

Fork of app-board-Joystick by Chris Styles

Committer:
chris
Date:
Mon Oct 15 13:37:36 2012 +0000
Revision:
0:0e4db18afd77
Child:
1:2bca33fa66a5
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:0e4db18afd77 1 #include "mbed.h"
chris 0:0e4db18afd77 2
chris 0:0e4db18afd77 3 BusIn joy(p15,p12,p13,p16);
chris 0:0e4db18afd77 4 DigitalIn fire(p14);
chris 0:0e4db18afd77 5
chris 0:0e4db18afd77 6 BusOut leds(LED1,LED2,LED3,LED4);
chris 0:0e4db18afd77 7
chris 0:0e4db18afd77 8 int main()
chris 0:0e4db18afd77 9 {
chris 0:0e4db18afd77 10 while(1) {
chris 0:0e4db18afd77 11 if (fire) {
chris 0:0e4db18afd77 12 leds=0xf;
chris 0:0e4db18afd77 13 } else {
chris 0:0e4db18afd77 14 leds=joy;
chris 0:0e4db18afd77 15 }
chris 0:0e4db18afd77 16 wait(0.1);
chris 0:0e4db18afd77 17 }
chris 0:0e4db18afd77 18 }