lkdfjlakdjsflasdkjflkjasdlxkfghskjdmfnvcm,a wejdfkjadsb cvljdgacus;b faLRFBhetg;8bdvan;/IHgtnudihdgrg;a/wlhrfp;ouitdscagjh

Dependencies:   mbed

Fork of display_nums2 by EECS 397 Lab Group

Revision:
5:10c020b45c1f
Parent:
3:1acb956e61b2
--- a/main.cpp	Fri Mar 09 22:02:39 2018 +0000
+++ b/main.cpp	Mon Apr 02 20:49:10 2018 +0000
@@ -22,11 +22,14 @@
 DigitalIn jogL(UI_JOG_LEFT_BUTTON);
 DigitalIn jogR(UI_JOG_RIGHT_BUTTON);
 
+
+
 extern spi_cfg AS1107;
 
 int main(void)
 {
-    
+  jogL.mode(PullUp);
+jogR.mode(PullUp);  
 
     
     int data;
@@ -62,10 +65,11 @@
     if(data == 2){
         stp_init();
         while(1){
-            if(jogL.read()==1){
+            wait(.1);
+            if(jogL.read() == 0){
                 stp_step(STP_CW);
             }   
-            else if(jogR.read() == 1){
+            else if(jogR.read() == 0){
                 stp_step(STP_CCW);       
             }
         }