Welcome, Guest

Author Topic: Getting Started  (Read 4100 times)

jucapini

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Getting Started
« on: September 25, 2012, 07:45:20 AM »
I am new in the Olimex world. I have bought an Olinuxino MAXI, I have done the instruction given by http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html
I could finally get an booteable image and I can now login as root.

Now, the problem is to get the blinking led. When I make ls /sys/class/gpio I can just see:

export  gpiochip0  gpiochip32  gpiochip64  unexport

But no other gpios, so I cant make the instructions given in the OLINUXINO manual, anyone has any idea???

Pd: Sorry for my English, I speak Spanish and I am trying to learn french, My english is getting worse and worse :-[

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1952
  • Karma: +50/-3
Re: Getting Started
« Reply #1 on: September 25, 2012, 10:15:37 AM »
Hello there,

Please type:

echo 65 > /sys/class/gpio/export

If you execute the above port 65 should be visible. If it is not visible the driver doesn't work for the Linux kernel you have and unfortunately you would have to start from the beginning following the how-to-build Arch Linux in the manual.
Technical support and documentation manager at Olimex

Fadil Berisha

  • Full Member
  • ***
  • Posts: 124
  • Karma: +7/-0
Re: Getting Started
« Reply #2 on: September 25, 2012, 05:22:36 PM »
Hello there,

Please type:

echo 65 > /sys/class/gpio/export

If you execute the above port 65 should be visible. If it is not visible the driver doesn't work for the Linux kernel you have and unfortunately you would have to start from the beginning following the how-to-build Arch Linux in the manual.

Kernel 3.x has support for class gpio and also class led. Needed only to activate on kernel menuconfig:
Code: [Select]
--> Device Driver
  --> LED Support
--- LED Support ---
 <*>   LED Class Support
 <*>   LED Support for GPIO connected LEDs
 <*>   PWM driven LED Support 
*** LED Triggers ***
<*>   LED Timer Trigger
<*>   LED One-shot Trigger
<*>   LED Heartbeat Trigger
<*>   LED backlight Trigger
<*>   LED GPIO Trigger
<*>   LED Default ON Trigger
*** iptables trigger is under Netfilter config (LED target) ***
<*>   LED Transient Trigger
In kernel, olinuxino led has label green, so in /sys/class you will see /sys/class/leds/green/trigger.
You can use LED Triggers with:

echo heartbeat >  /sys/class/leds/green/trigger   

echo default-on > /sys/class/leds/green/trigger   

Regards

Fadil Berisha