France
Asked

Ezbpi Server - Access To The Pi Gpios

Hi,

I have successfully connected ARC to the Pi using the EZBPi server, but I don't understand how to access the GPIOs of the Pi. If I want to set or read a digital port, how do I know which port in ARC correspond the right GPIO pinout?


Related Hardware Raspberry Pi
Related Controls Read Digital Set Digital

ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

#2  

Thanks PTP,

I was aware of the Pi GPIOs map, but I didn't get that there was a direct match between ARC port numbers and the Pi GPIO numbers. I am going to test it tonight.

PRO
USA
#3  

Bear in mind the raspberry pi is not 5v tolerant.

if you are reading logic voltages the limit is 3.3v

#4  

Ok, I made a test and it doesn't work. As a test, I try to switch on/off a LED with the "Set Digital" control. It works with my EZB v4 (so no issue with the LED), but not with the Pi (I have tested different pinouts)...

PRO
USA
#5  

Can you explain how you wire the led ?

you can’t wire a led without a resistor.

#6  

The LED is indeed wired with a resistor and works with the EZB v4 (I can switch it with the Set Digital control). It works also on the Pi if I plug it on the 3.3v pinout (+ground). It just seems that i cannot set digital on other GPIOs...

PRO
USA
#7   — Edited

Let's troubleshoot the issue:

connect your led (and the resistor) to pin 12 (GPIO 18)

open a console and run the commands below:

initialize the pin direction:


echo "out" > /sys/class/gpio/gpio18/direction

switch on:


echo "1" > /sys/class/gpio/gpio18/value

switch off:


echo "0" > /sys/class/gpio/gpio18/value

Let me know if you can toggle the led.

#8  

OK, thanks ptp

But first command, first error.

bash: /sys/class/gpio/gpio18/direction: No such file or directory

I don't have a /gpio18 folder in  /sys/class/gpio