Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

pcDuino image and GPIO support

Featured Replies

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.

 

 

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.

  • Author

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.

  • Author

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

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. 

 

 

Cmd for gpio

 

cd /sys/class/gpio

echo X > export

echo out > gpioX/direction

echo 1 > gpioX/value

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.