Commits

Anonymous committed 4b7e66b Merge

merging work

Comments (0)

Files changed (2)

src/platform/stm32f4/main.py

 
 def wait_BTN_release():
   while 1==x.BTN(): # waiting for release USER BUTTON
-    print 9
     sys.gc()     # clean up
-    print 10
     sys.wait(100)
-    print 11
-    print "COUCOU WAIT BTN"
 
 def LED_all(v=0):
     x.LED(0,v)
 
 sys.gc()
 
-def main():
+def gpio_demo() :
     """import gpio
     print "gpio imported"
     gpio.pin_mode("E", 7, gpio.OUTPUT)
         digital_write("E", 7, HIGH)
         digital_write("E", 7, LOW)
 
-ipm.ipm()
+def default_demo():
+    """
+    """
+    if 1==x.BTN():
+      while True:
+        wait_BTN_release()
+        x.AXEL(0)
+        LED_all();
+        while 0==x.BTN(): # until push USER BUTTON
+          LED_glow_seq(i)
+          wait_a_bit()
+        wait_BTN_release()
+        x.AXEL(1)
+        while 0==x.BTN(): # until push USER BUTTON
+          axel= x.AXEL()
+          LED_axel_indicate(axel)
+          wait_a_bit()
+    else:
+      ipm.ipm()
 
-# if 0==x.BTN():
-#     # main()
-#     while True:
-#         wait_BTN_release()
-#         x.AXEL(0)
-#         LED_all();
-#         while 0==x.BTN(): # until push USER BUTTON
-#           LED_glow_seq(i)
-#           wait_a_bit()
-#         wait_BTN_release()
-#         x.AXEL(1)
-#         while 0==x.BTN(): # until push USER BUTTON
-#           axel= x.AXEL()
-#           LED_axel_indicate(axel)
-#           wait_a_bit()
-# else:
-#     ipm.ipm()
+def main():
+    """
+    """
+    default_demo()
+    # gpio_demo()
+
+main()

src/platform/stm32f4/stm32f4discovery.py

File contents unchanged.