0

I am trying to use GPIO in Intel Galileo Gen 2 using Clanton terminal. For this I am using this tutorial. I am trying to use GPIO pin 12 of Galileo board. So, according to GPIO Pins Assignment table of this tutorial, I have to export "38". For testing purpose, I have connected an led with 330 ohm resistor in series with pin 12 of Galileo board and then I type following command:-

echo -n "38" > /sys/class/gpio/export

echo -n "out" > /sys/class/gpio/gpio38/direction

echo -n "strong" > /sys/class/gpio/gpio38/drive

echo -n "1" > /sys/class/gpio/gpio38/value

After these command, I was expecting to get my led ON but nothing happens. So, I check the Pin state using this command:-

cat /sys/class/gpio/gpio38/value

And I am getting value 1. So, I want to know what exactly I am missing here. Do pin mapping is different or there is any other way to use GPIO in Clanton? Thanks in advance

0andriy
  • 4,183
  • 1
  • 24
  • 37
Tabish Saifullah
  • 570
  • 1
  • 5
  • 25
  • Maybe you have the diode reversed? Maybe the LED is active when `0` is output; what did you connect to on the other end? Try toggling the output from `1` to `0` while measuring the pin with a voltmeter. – sawdust May 25 '17 at 20:29
  • Just side note. It's better to use meta-acpi layer where you can easily describe some devices: https://github.com/westeri/meta-acpi/ – 0andriy May 25 '17 at 21:06
  • 1
    That tutorial for Gen **1**, you need one for second generation, i.e. https://emutex.com/educational/71-getting-started-with-intel-galileo-gen-2 – 0andriy May 25 '17 at 21:12
  • 0andriy :- Thanks bro, it's working now – Tabish Saifullah May 26 '17 at 06:59

0 Answers0