Jump to content

pcDuino image and GPIO support


duino

Recommended Posts

Hi, totally new at this but here goes.

 

I have been working on a IoT project involving the pcDuino and have been having issues with the image supplied by linksprite and WiFi drivers etc.

 

I came across armbian, noticed the pcduino wheezy image and downloaded, installed all good and very impressed.

I then went to run my python scripts to test gpio ports and sensors but received the following error:

 

File "/home/iotadmin/gpio/__init__.py", line 43, in pinMode

    with open(_MODE_FD_PATH % id, 'w') as f:

IOError: [Errno 2] No such file or directory: '/sys/devices/virtual/misc/gpio/mode/gpio1'

 

 

I assume that the device mapping is different?

 

I would appreciate a pointer to any documentation that will help solve this issue.

 

 

Link to comment
Share on other sites

GPIOs are accessible by default but the numbers are different than on old kernel.

 

Check the link in my post before with title:

"Accessing the GPIO pins through sysfs with mainline kernel"

 

If you are using some interface like python, than you need to check how that lib was made.

 

... you can skip all the trouble if you use old / legacy kernel.

Link to comment
Share on other sites

Thanks for the info.

 

I have downloaded Legacy wheezy and whilst the directory path /sys/devices/virtual/misc/ exists it has no gpis subdir so I am getting the same error.

 

So I take it I have 2 options... 1) check if there is source for the gpio linksprite python libs or 2) Try and work out "Accessing the GPIO pins through sysfs with mainline kernel"

​I think option 2 may be out of my league.

Link to comment
Share on other sites

Just an update.

 

I have managed to get the GPIO mapping working from your supplied link so thanks for that!

There does not appear to be and Analog input support, is that correct?

/proc/adc1 for example

Link to comment
Share on other sites

There does not appear to be and Analog input support, is that correct?

/proc/adc1 for example

Only tablet buttons attached to LRADC inputs are supported in mainline kernel, there is no driver that can provide actual ADC value, as far as I see.

 

 

 * Allwinnner sunxi SoCs have a lradc which is specifically designed to have
 * various (tablet) keys (ie home, back, search, etc). attached to it using
 * a resistor network. This driver is for the keys on such boards.
 *
 * There are 2 channels, currently this driver only supports channel 0 since
 * there are no boards known to use channel 1. 

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines