Code Files

Program Files for Arduino and Touch Screen

The file that needs to be uploaded should be Ardu.ino and the file needed for the touch screen should be TouchSC.HMI

Arduino code (Old Versions)

Arduino Code V1 (.ino file)

On how to upload the code onto an Arduino microcontroller refer to this tutorial from the official Arduino website. The Arduino code should be uploaded onto the microcontroller before it is connected to the rest of the system. This can easily be done with the USB cable provided with the purchased Arduino.

For the specific microcontroller, it is recommended to run the system with an Arduino Mega 2560. A bigger Arduino should work just fine. However, a smaller Arduino board, such as an Arduino Uno, is not recommended for use in this project. While it is possible to run the system on an Arduino Uno, there is not much memory on the board, so there will potentially be some stability issues.

With the Nextion touchscreen, it needs to be connected to power (the red and black wires need to be connected accordingly) before the code can be transferred.

For uploading the code to the Nextion touch screen, you will need a microSD card. Here, a microSD USB adapter is used to upload the code onto the microSD. Right click on the USB device and click Format.

Clicking on Format should bring up this pop up. The important thing is that the File system is FAT32. Click start and the data from the microSD card should be cleared. Click Close after it is done formatting.

In the Nextion editor software, go to TFT file output under File. Make sure that the correct USB drive is selected for the location that the TFT file will be uploaded to. After that, click Output and the microSD should be ready to go. All that is needed is to insert the microSD into the back of the touchscreen device and connect it to power. After the touchscreen says that the upload is complete, remove the touchscreen from power and remove the microSD. Note that this TFT file only works with the Nextion Intelligent Series 7" Touch Screen. If a different touchscreen is used, the project will need to be imported to the correct model. However, the process of uploading the code to the device is still the same.