Introduction: ArduinoUNO+Nextion+Joystick+Moving Figure

Hi guys!

Today im going to describe my little-funny-evening project about moving the figure on the Nextion HMI display by the joystick connected to Arduino UNO :)

Step 1: Components

1. Joystick

2. UNO board

3. Breadboard

4. Nextion HMI

See photos :)

Step 2: Connections

1. Breadboard needed to share arduino power source among joystick and Nextion.

2. Joystick connection to Arduino:

5V -> 5V;

GND -> GND;

VRx -> A0;

VRy -> A1;

SW -> digital pin 2 (not important);

3. Nextion connection to Arduino:

5V -> 5V;

GND -> GND;

RX -> digital pin 4;

TX -> digital pin2;

Here you can find Instructable about uploading project to Nextion HMI.

Step 3: Nextion Project

You need to create project in Nextion Editor and add 3 variables responsible for:

va0 - X-position of figure;

va1 - Y-position of figure;

va2 - in my project is the Raduis of circle;

Dont forget to set initial values!

Step 4: Arduino Sketch

1. Please download and add this arduino library to work with Nextion HMI;

2. Upload my sketch;

3. Learn all used commands here;

Attachments

Step 5: Some Video....

Thank you:)