
Hardware:
Raspberry Pi
Author: amin
This firmware converts a Raspberry Pi into an EZB for ARC to connect to it.
This server program turns a Raspberry Pi into an EZ-B. The Raspberry Pi Camera, Digital Ports and UART are just some of the peripherals of the Raspberry Pi that can be controlled by ARC with this server. If you are running ARC on the Pi at the same time, connect to the EZBPi server with address 127.0.0.1.
If the EZBPi server is used, the ARC connection can be remote from an external computer over WiFi (or LAN). Or the ARC connection can be running on the Raspberry Pi by connecting to 127.0.0.1 (localhost). There are limitations to the EZBPi Server, in that PWM servos are not supported, but Bi-Directional UART/Serial servos are (Robotis Dynamixel, LewanSoul, etc.)
You can connect to Raspberry Pi to control the ports and watch the live camera feed from a Windows PC using this program.
Use The Pi as an EZBPi Server
This server program turns a Raspberry Pi into an EZB that robot components can connect to and ARC connects to the server. The Raspberry Pi Camera, Digital Ports, and UART are just some of the peripherals of the Raspberry Pi that can be controlled by ARC with this server. The server turns the Raspberry Pi into an EZB.
With the EZBPi server, the ARC connection will from a remote computer over WiFi (or LAN). There are limitations to the EZBPi Server than other EZBs, in that PWM servos are not supported, but Bi-Directional UART/Serial servos are (Robotis Dynamixel, LewanSoul, etc.)
EZBPi Server Install Instructions
- Install Mono (32 bit OS only)
sudo apt install mono-devel
Download the EZBPi Server ZIP file from the firmware list above
Unzip the archive.
unzip EZBPi.zip
- Navigate into the newly created directory
cd EZBPi
- Execute the server with sudo and mono. Sudo is required because the server listens on TCP ports and therefore needs permission.
sudo mono ./EZBPi.exe
- Connect to the EZBPi server from ARC by entering the IP Address of the Pi in the connection skill.
EZBPi Server UART
The Raspberry Pi has a hardware UART that is connected to GPIO14 (TX) and GPIO15(RX). These are physical pins 8 and 10, respectively. Any ARC skills that use the UART (such as Dynamixel) or Script commands will default to using this port.
In order to get the UART to work, a few configurations need to be made on the Raspberry Pi using the raspi-config setup program.
From command-line, type: sudo raspi-config
- Select the Interfaces menu option
- Select the Serial menu option
- Answer NO to the question about login shell
- Answer YES to the question about serial hardware port
- Save and exit the raspi-config menu
- Reboot
EZBPi Server Command-Line Arguments
The EZBPi server accepts command-line arguments for configuration values. With these command-line arguments, the default TCP ports for the EZB and Camera can be changed. Also, the verbose logging can be changed. To view the list of available arguments, enter...
sudo mono EZBPi.exe -h
@Athena How to control Arduino Mega as EZB to connect with EZBPiserver Raspberrypi
@Athena im Running EZBpi server on pi5 im getting this error how to resolve this? ~/EZBPi $ sudo mono EZBPi.exe Raspberry EZBPi Version: 2019.8.27.1 Is this a Raspberry Pi? System.DllNotFoundException: libwiringPi.so.2.46 assembly: type: member:(null) at (wrapper managed-to-native) Unosquare.WiringPi.Native.WiringPi.WiringPiSetupGpio() at Unosquare.WiringPi.GpioController.Initialize (Unosquare.WiringPi.ControllerMode mode) [0x00066] in <57ba28dc71224faf83dfd691c70e4268>:0 at Unosquare.WiringPi.GpioController..ctor () [0x00016] in <57ba28dc71224faf83dfd691c70e4268>:0 at Unosquare.WiringPi.BootstrapWiringPi.Bootstrap () [0x0001a] in <57ba28dc71224faf83dfd691c70e4268>:0 at Unosquare.RaspberryIO.Pi.Init[T] () [0x0001f] in :0 at EZBPi.EZBProgram.Main (System.String[] args) [0x000ca] in :0
The error you're encountering is related to the
libwiringPi.so.2.46
library, which is part of the WiringPi library used for GPIO control on Raspberry Pi. It seems that the library is either missing or not properly installed on your Raspberry Pi 5.Here's how you can resolve this issue:
Install WiringPi:
Verify WiringPi Installation:
Check for Compatibility:
Re-run the EZBPi Server:
Alternative Libraries:
If you continue to experience issues, please let me know, and we can explore further troubleshooting steps.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena Im getting errors sudo apt-get install wiringpi Reading package lists... Done Building dependency tree... Done Reading state information... Done Package wiringpi:armhf is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'wiringpi:armhf' has no installation candidate
It seems that the WiringPi package is no longer available in the default repositories for your version of the Raspberry Pi OS. This is a known issue since WiringPi has been deprecated. However, you can still install it manually by following these steps:
Download WiringPi Source:
Build and Install WiringPi:
Verify Installation:
Re-run the EZBPi Server:
If you encounter any issues during the installation process, please let me know, and we can explore further troubleshooting steps. Additionally, if WiringPi does not work on Raspberry Pi 5, you might need to look for alternative GPIO libraries that are compatible with your hardware.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena I installed from GitHub but I'm getting like this and unable to connect with ARC
laxme@raspberrypi:-/EZBP1 $ sudo mono EZBPi.exe
Raspberry EZBP1 Version: 2019.8.27.1
Is this a Raspberry Pi?
System.DllNotFoundException: libwiringPi.so.2.46 assembly: type: member: (null)
at (wrapper managed-to-native) Unosquare.WiringPi.Native.WiringPi.WiringPiSetupGpio()
Unosquare.wiringPi.GpioController. Initialize (Unosquare.WiringPi.ControllerMode mode) [0x00066] in <57ba28dc71224
at Unosquare.WiringPi.GpioController..ctor () [0x00016] in <57ba28dc71224faf83dfd691c70e4268>:0
at Unosquare.WiringPi.BootstrapWiringPi.Bootstrap () [0x0001a] in <57ba28dc71224faf83dfd691c70e4268>:0
at . Init [T] () [0x0001f] in :0
at Unosquare. Raspberry10.Pi at EZBP1.EZBProgram. Main (System.String[] args) [0x000ca] in :0
laxme@raspberrypi:~/EZBP1 S mono EZBPi.exe
Raspberry EZBP1 Version: 2019.8.27.1
Verbose logging is: False
Serial port is: /dev/seriale
EZB: TCP Started on port 23
EZ-B Server started on TCP Port: 23
Camera: TCP Started on port 24
Camera Server started on TCP Port: 24
Press ESC to quit
EZB: Error Access denied
Camera: Error Access denied
The error messages you're encountering suggest a couple of issues related to permissions and possibly the WiringPi library. Let's address these step by step:
Permissions Issue:
sudo
to have the necessary permissions.WiringPi Library Issue:
DllNotFoundException
forlibwiringPi.so.2.46
suggests that the WiringPi library is either not installed correctly or not found in the expected location. Since WiringPi is deprecated, you might need to ensure that the library is correctly linked.Check WiringPi Installation:
/usr/local/lib
directory:Rebuild WiringPi:
Check Serial Port Permissions:
dialout
group to grant access:Re-run the EZBPi Server:
sudo
:If you continue to experience issues, please let me know, and we can explore further troubleshooting steps. Additionally, consider checking for any updates or alternative libraries that might be more compatible with Raspberry Pi 5.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena Even after following all instructions still im getting the same error , how to resolve this? and make raspberrypi as a EZBPi server? laxme@raspberrypi:-/EZBP1 $ sudo mono EZBPi.exe
Raspberry EZBP1 Version: 2019.8.27.1
Is this a Raspberry Pi?
System.DllNotFoundException: libwiringPi.so.2.46 assembly: type: member: (null)
at (wrapper managed-to-native) Unosquare.WiringPi.Native.WiringPi.WiringPiSetupGpio()
Unosquare.wiringPi.GpioController. Initialize (Unosquare.WiringPi.ControllerMode mode) [0x00066] in <57ba28dc71224
at Unosquare.WiringPi.GpioController..ctor () [0x00016] in <57ba28dc71224faf83dfd691c70e4268>:0
at Unosquare.WiringPi.BootstrapWiringPi.Bootstrap () [0x0001a] in <57ba28dc71224faf83dfd691c70e4268>:0
at . Init [T] () [0x0001f] in :0
at Unosquare. Raspberry10.Pi at EZBP1.EZBProgram. Main (System.String[] args) [0x000ca] in :0