Controlling a robotic arm over Wi-Fi with UDOO NEO

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Controlling a robotic arm over Wi-Fi with UDOO NEO

Controlling a robotic arm over Wi-Fi with UDOO NEO






This document explains how to establish communication between the A9 core running Linux and the M4 core running an Arduino sketch on a UDOO NEO board to remotely control a robotic arm over Wi-Fi.


150249_150249.jpgIMG_20160505_093729167_HDR.jpgFigure 1: UDOO NEO board connected to the robotic arm


For more information about getting started with UDOO NEO board please refer to:

Introduction - UDOO Neo Docs




a) UDOO NEO board with UDOObuntu image and proper connectivity.

  • The Linux image used is UDOObuntu 2 RC1 or RC2 (Ubuntu 14.04), available for download from the following link:

     ARM Development Boards | Extended Support from UDOO

  • For creating a bootable SD card and other basic setup please refer to the following guidelines:

     Very First Start - UDOO Neo Docs

  • Then, it is required to install the proper drivers to ensure connectivity, including USB communication with Linux terminal of the target board. Please refer to the link below:

     Usb Direct Connection - UDOO Neo Docs

b) The robotic arm itself. In this case, the used arm has four servomotors: three for articulation and one for open/close the clamp.

c) A Wi-Fi router, and an additional Wi-Fi device with any SSH client application for the remote control of the arm.





a) The first connection to consider is the USB Direct connection of the UDOO NEO board with the host PC, in order to configure the Wi-Fi network and remotely view of the desktop (VNC client) for Arduino sketch programming.


b) Then, it is required to consider the arm connection, which consists of four servomotors. Therefore, the motors must be powered by a separate power supply and controlled by four PWM signals. In this case, they will be connected to PWM_1, PWM_2, PWM_3 and PWM_4 signals of J4 connector (Arduino signals). Figure 2 shows the mentioned connection:


150250_150250.pngmotors connection.png

Figure 2: Servomotors connection to UDOO NEO board.





4.1 Connecting to a Wi-Fi network. After turning on the UDOO NEO board, the USB Direct connection will install a virtual NIC on the host PC, in order to access to the “Dashboard”, a configuration webpage loaded on the NEO board that could be viewed from any web browser at address You can connect to wireless networks by using the Web Control Panel, in Configuration/Network settings.

After establishing connection with the Wi-Fi router, the Dashboard must indicate the assigned IP address of the NEO board as indicated on Figure 3. It is important to remember such address in order to establish the wireless access to the NEO board later (optionally, the NEO could be configured for a static IP address, or the router could be configure to assign the same IP address to the NEO board).


150251_150251.pngdashboard.pngFigure 3: Dashboard showing the IP address of the NEO board.


Now the USB direct connection could be removed, as the Dashboard, remote terminal and VNC server are also available over Wi-Fi using the Wi-Fi IP address.


4.2. Programming the Arduino sketch. The remote desktop of the NEO could be viewed with any VNC client on the host PC, indicating the NEO’s IP address, user and password (same as SSH remote Terminal). The UDOObuntu image already include Arduino IDE configured for UDOO NEO board, so it is just required opening it to start writing the code. Figure 3 shows the UDOO NEO Desktop, which includes a Terminal window and the Arduino IDE. The sketch is available as attachment.


150252_150252.pngneo dektop.pngFigure 4: Desktop of UDOO NEO board.


4.3. Arduino sketch functionality. The Arduino program starts waiting for any incoming data over the serial port. After receiving any serial data, the four servomotors are initialized to the default position (90°). The serial port communication is established between a virtual serial port on Arduino side (Serial0), and the virtual serial port for the Multi-Core Communication (ttyMCC), like shown on Figure 5. For additional information please refer to the link below:

Communication - UDOO Neo Docs

150254_150254.PNGDOCS_a9_m4_serial.PNGFigure 5: Communication between cores.

  • Once the motors are initialized, each movement is defined by a key to increase and decrease the angle position of the motors, except for the clamp, which is adjusted to open/close positions.
  • Keys 'Q' and 'W' adjust the first motor; keys 'A' and 'S' adjust the second motor; keys 'D' and 'F' adjust the third motor, and finally, keys 'Z' and 'X' are used to open/close the clamp.
  • Additionally, key 'R' resets all motors to default positions; key 'C' is used to enable/disable the PWM signals, and key 'V' prints the angle values of all motors.
  • The adjust step of motors is defined with the macro “ANGLE_STEP”; the units are degrees.





For demonstrative functionality, the UDOO NEO board running the Arduino sketch was connected to a Wi-Fi network, and it is also connected to the same network an Android phone with SSH app used to control the robotic arm. Figure 6 shows a screen capture of the mentioned app controlling the robotic arm.

150255_150255.pngScreenshot_20160505-101105.pngFigure 6: SSH app accessing to UDOO NEO.


Finally, the following video shows the functionality of the application:


Original Attachment has been moved to:

No ratings
Version history
Last update:
‎05-24-2016 11:57 AM
Updated by: