This project is read-only.

Based on tutorial about using Nextion progress bar control with Arduino (, I created demo how to create it with Gadgeteer board.

Hardware requirements

  1.        Gadgeteer mainboard (I used
  2.        Nextio Display (I used
  3.        Extender / Breakout module to connect Nextion display to Gadgeteer port (I used
  4.        Gadgeteer Joystick module, potentiometer module or something similar (I used

Software requirements

  1.        Gadgeteer developer environment (Visual Studio, SDKs, …)
  2.        Nextion.NET Gadgeteer driver (
  3.        Nextion progress bar demo HMI file (

Step by step tutorial

  1.        Upload Nextion progress bar demo HMI file
  2.        Create new Gadgeteer Application project
  3.        Use gadgeteer designer to design your hardware connections.
  4.        Use this code

namespace NextionTest
   public partial class Program
       private ProgressBar NextProgress;
       private TextBox NextProcent;

       // This method is run when the mainboard is powered up or reset.   
       void ProgramStarted()
           //Define controls in Nextion HMI. 
           //Because we don’t use touch events the order of defining controls is not important.
           NextProgress = nextionDisplay.Controls.DefineProgressBar(0, "j0");
           NextProcent = nextionDisplay.Controls.DefineTextBox(0, "t0"); 

           //Start refresh timer to read value from joystick and display it on the Nextion display
           var refreshTimer = new GT.Timer(100);
           refreshTimer.Tick += refreshTimer_Tick;

       void refreshTimer_Tick(GT.Timer timer)
           //Convert joystick position to percentage
           byte proc = (byte)((joystick.GetPosition().X + 1) * 50);
           //Change progress bar value
           NextProgress.Val = proc;
           //Change textbox value
           NextProcent.Text = proc.ToString();

  1.        Deploy and test

Last edited Sep 2, 2015 at 10:39 AM by jernejk, version 1