0 Replies Latest reply on Dec 4, 2014 10:43 AM by intel_jorge

    Interacting with edison IO on python

    intel_jorge

      Note: thread originally created by user: arfoll

      On Edison, libmraa provides a python module to interact with the onboard IO. In this example we'll flash the onboard LED from the arduino baseboard, obviously many more interesting usages are up to you to discover!

       

      #!/usr/bin/env python
      
      import mraa
      import time
      
      x = mraa.Gpio(13)
      x.dir(mraa.DIR_OUT)
      
      while True:
          x.write(1)
          time.sleep(0.2)
          x.write(0)
          time.sleep(0.2)
      
      

       

      The libmraa python API documentation is always up to date here. You can use it to interact with i2c, spi & the ADC on the edison board. More examples are available here.