Why does this small amount of code not make the onboard LED flash?
(pio-pin-setdir *pio-output* 'PB_29)
(pio-pin-sethigh 'PB_29)
(loop (pio-pin-setlow 'PB_29)
         (tmr-delay 0 100000)
         (pio-pin-sethigh 'PB_29))
All that happens in the blue LED turns on and stays on, even though the code clearly says for it to go from high to low repeatedly. Any ideas? Also this example on the hempl wiki book:

# A simple program which demonstrates
# the usage of user-buttons.
# declare pins
(setq led 'PB_29 button 'PX_16)

# a simple delay function
(de delay (t)
   (tmr-delay 0 t) )

# make sure the LED starts in
# the "off" position and enable
# input/output pins
(de init-pins ()
   (pio-pin-sethigh led)
   (pio-pin-setdir *pio-output* led)
   (pio-pin-setdir *pio-input* button) )

# And now, the main loop
(de prog-loop ()
      (if (= 0 (pio-pin-getval button))
         (pio-pin-setlow led)
         (delay 100000)
         (pio-pin-sethigh led)
         (delay 100000) ) ) )


Doesn't make the LED flash it just stays on.

UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to