1 2 Previous Next 17 Replies Latest reply on Oct 3, 2016 5:08 AM by vinay@

    Pin-Toggle ("Blink") script for Edison

    Daveman

      Uses D7
      keep in mind that due to the large 47k pullup, the LED won't be very bright... but it does toggle the digital pin between 0 and +5V.

       

      #gpio_blink.sh
      echo -n "48"  > /sys/class/gpio/export
      echo -n "in"  > /sys/class/gpio/gpio48/direction
      echo -n "255" > /sys/class/gpio/export
      echo -n "out" > /sys/class/gpio/gpio255/direction
      echo -n "0"   > /sys/class/gpio/gpio255/value
      echo -n "223" > /sys/class/gpio/export
      echo -n "out" > /sys/class/gpio/gpio223/direction
      while true; do
          echo -n "1" > /sys/class/gpio/gpio223/value
          sleep 1
          echo -n "0" > /sys/class/gpio/gpio223/value
          sleep 1
      done

       

       

      20140714_214645_resized.jpg

      Thanks to MarkBunney_Intel for helping to test this.

       

      Message was edited by: DAVID BUCHMAN

        1 2 Previous Next