-
Notifications
You must be signed in to change notification settings - Fork 98
Nextion Display
Unfair sellers sells a chenese version of the nextion, these are branded TJCxxxxx, they are not supported by the nextion editor and would be useless with SimHub, make sure to buy a real nextion (model starting with NXxxxx)
7" nextion is not advised due to average performance
4.3 or 2.8 nextion have bundled templates other sizes will work but will require custom template design.
Parts needed :
- Nextion display (4.3 or 2.8),
- Wires
- Usb TTL
Connect USB TTL following these wirings
GND => GND
5V => 5V
RX => TX
TX => RX
Warning ! Trap inside ! Take care, TX goes to RX
Always make sure Simhub is closed before uploading.
MICRO => Nextion
GND => GND
VCC => 5V
RX1 => TX
TX0 => RX
In order to draw enough power from the arduino micro (for the 4.3 and more nextion screens) you may have to solder the J1 jumper of the arduino :
Upload the sketch found in C:\Program Files (x86)\SimHub\_Addons\NextionMicroBridge
It offers the structure to add gamepad support, please note that it's just a sample with a single button and you must add your own logic.
In order to compile the sketch please use the arduino IDE in C:\Program Files (x86)\SimHub\\_Addons\Arduino\ArduinoIDE\arduino-1.6.13
it contains all the required libraries
WS2812b leds can be added to the arduino micro
Aduino Micro => Leds
GND => GND
5V or VCC => 5V or VIN
D6 or 6 => DIN
LEDS have a direction ! Do not mix uy DI/DIN with DO/DOUT ! DO/DOUT can be used to cascade another strand
In order to enable leds you have to configure the sketch in the Aduino IDE :
- Before (leds disabled):
// ----- LEDS ---------
// Uncomment to enable leds
// #define INCLUDE_WS2812B
// How many leds
#define WS2812B_RGBLEDCOUNT 8
// Data pin
#define WS2812B_DATAPIN 6
// 0 left to right, 1 right to left
#define WS2812B_RIGHTTOLEFT 1
- After (leds enabled), change
WS2812B_RGBLEDCOUNT
according to how many leds are plugged
// ----- LEDS ---------
// Uncomment to enable leds
#define INCLUDE_WS2812B
// How many leds
#define WS2812B_RGBLEDCOUNT 8
// Data pin
#define WS2812B_DATAPIN 6
// 0 left to right, 1 right to left
#define WS2812B_RIGHTTOLEFT 1
The leds can be configured in Arduino/Leds
Upload to nextion will not work using the Itead nextion editor but Simhub offers an alternative uploader.
- Build your template using the editor using the "compile" button :
- Open build folder :
- double click on your template file :
- Choose your arduino serial port and click on upload, you're ready !