View unanswered posts | View active topics It is currently Mon Dec 16, 2019 7:03 am

Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
 Fitlet and GPIO access 
Author Message

Joined: Thu Oct 29, 2015 10:21 am
Posts: 5
Post Re: Fitlet and GPIO access

I've finally gotten some time to play with the Fitlet and gpio under Mint and am having a few difficulties.

In the documentation for the fitlet SDK under Linux, under the usage section, there is a line
"modprobe fch_gpio"

This fails, saying "module fch-gpio not found". I checked the other documentation and presume it is a typo, as "modprobe gpio_fch" seems to work and loads the module as required. So far, so good, however I can't seem to set the direction of the I/O pin and it acts like an input at all times.

The line "Echo 89 > /sys/class/gpio/export" seems to work ok, as is confirmed by the creation of a directory named gpio89 on the path /sys/class/gpio

The line "echo out > /sys/class/gpio/gpio89/direction" appears to work, as the file direction does now hold the value "out". This can also be set to "in" successfully as well as "low" and "high" but no other values, AFAIK.

At this point there is 3.3v on pin gpio89, echoing 1 or 0 to /sys/class/gpio/gpio89/value makes no difference to this value.

The pin does seem to work as an input with a pull-up, however. If I leave it alone, then the command
"cat /sys/class/gpio/gpio89/value" yields a 1 whereas if I connect the pin down to ground then
"cat /sys/class/gpio/gpio89/value" yields a 0 - which is as required.

So in summary, the problem seems to be with the implementation of the direction command and communicating this information to the gpio chip.

I'd be grateful for any help you can give


dave Langstaff

Thu Jan 07, 2016 4:27 pm

Joined: Thu Oct 29, 2015 10:21 am
Posts: 5
Post Re: Fitlet and GPIO access
The direction error was due to me having an out of date kernel, I updated that and everything is working fine now, although the fch_gpio typo in the documentation is still a gotcha.

Fri Jan 08, 2016 9:23 am
Post Re: Fitlet and GPIO access
Thanks, we will check this

Mon Jan 11, 2016 7:36 am

Joined: Thu Sep 17, 2015 8:43 am
Posts: 21
Post Re: Fitlet and GPIO access
I am trying Win10-64 and Matlab 2016B-64 on Fitlet. Very nice experience but I fail to load the GPIO.dll into Matlab.
>> loadlibrary('C:\System\GPIO','C:\System\GPIO.h')
Matlab complains that the dll is not 64-bit. There is a known issue that 64-bit Matlab does not run 32-bit dlls. Could you post a link to a 64-bit dll and the header file. Matlab requires the header file and it would save me some trials in the dark. I'll be happy to post the results here when I have something that works.

Tue Mar 14, 2017 2:39 pm
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.