Jump to content

Recommended Posts

Posted

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.

 

 

Posted

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.

Posted

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.

Posted

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

Posted

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. 

 

 

Posted

pcduino3 nano Armbian_5.31_Pcduino3nano_Debian_jessie_next_4.11.5.img

cat /proc/adc2

work in ubuntu

how i do in armbian?

 

.......heaven just knows

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

Important Information

Terms of Use - Privacy Policy - Guidelines