AHHHhhhhh

Dependencies:   ACM1602NI mbed

Files at this revision

API Documentation at this revision

Comitter:
WAT34
Date:
Wed Sep 30 07:37:28 2015 +0000
Parent:
0:bbaf8033ed44
Commit message:
bugs were fixed.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Sep 28 05:36:49 2015 +0000
+++ b/main.cpp	Wed Sep 30 07:37:28 2015 +0000
@@ -1,14 +1,12 @@
 #include "mbed.h"
 #include "ACM1602NI.h"
-BusIn sw(p6,p8,p21,p10,p23,p12,p24,p22);
+BusIn sw(p22,p29,p21,p10,p23,p12,p24,p22);
 BusIn t(p9,p11);
 BusIn ajust(p29,p30);
-/*
-DigitalIn paul1(p17,PullUp);
-DigitalIn paul2(p18,PullUp);
-DigitalIn paul3(p19,PullUp);
-DigitalIn paul4(p20,PullUp);
-*/
+DigitalIn paul1(p5,PullUp);
+DigitalIn paul2(p6,PullUp);
+DigitalIn paul3(p7,PullUp);
+DigitalIn paul4(p8,PullUp);
 AnalogIn r(p17);
 AnalogIn l(p15);
 //BusOut led(LED1,LED2);
@@ -37,7 +35,7 @@
             dt = dt-0.02;
             led = 2;
         }
-        /*if (paul1 == 0){
+        if (paul1 == 0){
             dt = 10;
         }
         if (paul2 == 0){
@@ -48,7 +46,7 @@
         }
         if (paul4 == 0){
             dt = -20;
-        }*/
+        }
         tilt = dt;
         data = sw;
         robo.putc(255);
@@ -61,6 +59,8 @@
         //printf("%d\n\r",~data);
         //printf("%lf--%lf\n\r",ra,la);
         printf("%d---%d\n\r",ro,lo);
-        lcd.printf("tiltness :%d\n",tilt);
+        lcd.printf("tilt :%3d\n",tilt);
+        //lcd.printf("tilt :%d\n",tilt);
+        lcd.locate(0,0);
     }
 }