![Cheap Controls](/img/default-banner.jpg)
- 204
- 946 542
Cheap Controls
United States
Приєднався 13 вер 2018
This channel has a main focus on the #Nextion #tutorials for their displays. I also mix in some #Arduino Tutorials, along with some basic electronic tutorials. There are some fun videos on food and just general silliness.
202 Python Nextion Connection
There is a blog post that accompanies this video. It sometimes contains the HMI. I ask for a small donation if you download the code, but nothing stops you from downloading it for free.
cheapcontrols.com/2023/06/29/an-introduction-to-a-python-connection-to-the-nextion-display/
This video shows how to use Visual Studio code to send Python commands to the Nextion display. I also discuss using hterm to troubleshoot serial data. Here is a link to hterm www.der-hammer.info/pages/terminal.html
If you think this tutorial is helpful, please support my channel by subscribing to my UA-cam channel or by using the Amazon/eBay/ClouDNS Affiliated links below. I will get a small commission from your purchase to grow my channel:
Nano Every - amzn.to/3PHc7CP
generic nano - amzn.to/44gj3e9
nano shield - amzn.to/3Js8T22
stepper motor - amzn.to/3Xi3Era
TB6600 driver - amzn.to/3NnuSZ5
4.3" display -- amzn.to/3IWBsEo
7.0" display amzn.to/3C99zVT
2.8" display amzn.to/43lfxPl
00:45 - Nextion Configuration
01:50 - Python Code
04:15 - Recieve data from the display
05:40 - Sending values to the display
08:10 - Troubleshooting with hterm
15:25 - Sending text to the display
19:40 - RECAP
cheapcontrols.com/2023/06/29/an-introduction-to-a-python-connection-to-the-nextion-display/
This video shows how to use Visual Studio code to send Python commands to the Nextion display. I also discuss using hterm to troubleshoot serial data. Here is a link to hterm www.der-hammer.info/pages/terminal.html
If you think this tutorial is helpful, please support my channel by subscribing to my UA-cam channel or by using the Amazon/eBay/ClouDNS Affiliated links below. I will get a small commission from your purchase to grow my channel:
Nano Every - amzn.to/3PHc7CP
generic nano - amzn.to/44gj3e9
nano shield - amzn.to/3Js8T22
stepper motor - amzn.to/3Xi3Era
TB6600 driver - amzn.to/3NnuSZ5
4.3" display -- amzn.to/3IWBsEo
7.0" display amzn.to/3C99zVT
2.8" display amzn.to/43lfxPl
00:45 - Nextion Configuration
01:50 - Python Code
04:15 - Recieve data from the display
05:40 - Sending values to the display
08:10 - Troubleshooting with hterm
15:25 - Sending text to the display
19:40 - RECAP
Переглядів: 1 854
Відео
201 Nextion and Arduino controlling a TB6600 stepper board
Переглядів 2 тис.Рік тому
There is a blog post that accompanies this video. It contains the HMI at www.cheapcontrols.com. I ask for a small donation if you download the code, but nothing stops you from downloading it for free. This is an update to a previous video. I add delimiters to the commands. I use microseconds to control the asynchronous delays to speed up the motor. I also added feedback from the Arduino to let ...
200 Nextion tutorial, dual passcodes, eeprom, program.s, vis COMMANDS GALORE!!!!
Переглядів 2 тис.Рік тому
There is a blog post that accompanies this video. It contains the HMI. I ask for a small donation if you download the code, but nothing stops you from downloading it for free. cheapcontrols.com/2023/06/09/passcodes-on-a-nextionvideo-200/ This video shows how to have two separate passwords. A general user has limited access, and an admin user with access to additional pages. I have a timeline be...
199 building a tester part 4, adding the Python and Feedback from JavaScript, PHP, AND MYSQL
Переглядів 115Рік тому
See more at www.cheapcontrols.com If you think this tutorial is helpful, please support my channel by subscribing to my UA-cam channel or using the Amazon/eBay/ClouDNS Affiliated links below. I will get a small commission from your purchase to grow my channel: From My own lab DC Power Supplu amzn.to/3IQermw Weller Soldering Station amzn.to/3OSUNKj ESP32 modules amzn.to/3MPo2uT GY-521 gyroscope ...
198 installing XAMPP
Переглядів 231Рік тому
If you think this tutorial is helpful, please support my channel by subscribing to my UA-cam channel or using the Amazon/eBay/ClouDNS Affiliated links below. I will get a small commission from your purchase to grow my channel: From My own lab DC Power Supplu amzn.to/3IQermw Weller Soldering Station amzn.to/3OSUNKj ESP32 modules amzn.to/3MPo2uT GY-521 gyroscope amzn.to/3WMLduA See more at www.ch...
197 building a tester part 3, adding the JavaScript, PHP, AND MYSQL
Переглядів 145Рік тому
See more at www.cheapcontrols.com In this video, I add JavaScript, PHP, and MySQL. I start with any changes to the HTML. Then, I add the JavaScript calls to PHP. I start the PHP but move into MySQL, then return to PHP. I finished showing some troubleshooting. I am just a guy making things for fun. I make plenty of errors, but the people commenting and supporting make it easy to correct and move...
196 building a tester PART 2 HTML, CSS a good video if you have insomnia
Переглядів 186Рік тому
See more at www.cheapcontrols.com In this video, I discuss the HTML and CSS portion of the tester build. You might want to wait to watch until after a couple more videos are made. It will become more interesting after you add your own devices to measure. Over the next few weeks, we will review how to add real-world measurements. We will store and display the data. I am just a guy making things ...
195 Introduction to building a tester with HTML, CSS, PHP, JavaScript, MySQL, Python and more!
Переглядів 315Рік тому
If you enjoy the content, consider donating a cup of coffee at ko-fi.com/cheapcontrols or using the Thank you button on this video. There is more information on the topic on the Cheap Controls website. cheapcontrols.com/2023/04/27/building-a-tester-intro195/ In this video, I introduce what the series will be. There is no instruction in this first video. I will go over each aspect in a series of...
194 Nextion tutorial GPIO Pins and a trial Relay Board using the cfgpio command
Переглядів 2,7 тис.Рік тому
There is more information on the topic on the Cheap Controls website. I don't have a specific article on this yet, but I hope to soon. Here is a link to the relay board cheapcontrols.com/products/ In this video, I show the GPIO pin output configuration. I also go over a relay board that I am working on. I am looking to sell a few so I can make more of the same and more products. I could not get...
193 Nextion, Accelerometer, Hall Effect, Lux Blox, Arduino Nano and a DRV8833
Переглядів 717Рік тому
If you enjoy the content, consider donating a cup of coffee at ko-fi.com/cheapcontrols or using the Thank you button on this video. There is more information on the topic on the Cheap Controls website. This article was written by the ever-hunky Ed Malloy. cheapcontrols.com/2023/03/16/rpms-with-an-accelerometer-part-1/ In this video, I discuss collecting information from the GY-521 accelerometer...
192 Nextion Data Record Software a feeble attempt at python coding
Переглядів 1,4 тис.Рік тому
If you enjoy the content, consider donating a cup of coffee at ko-fi.com/cheapcontrols or using the Thank you button on this video. There is a blog post that accompanies this video. It sometimes contains the HMI. I ask for a small donation if you download the code, but nothing stops you from downloading it for free. cheapcontrols.com/2023/03/08/nextion-data-record-softwarevideo-192/ In this vid...
191 Nextion Scrolling text
Переглядів 2,1 тис.Рік тому
If you enjoy the content, consider donating a cup of coffee at ko-fi.com/cheapcontrols or using the Thank you button on this video. This is a link to the Nextion regular text box video. ua-cam.com/video/ylDRIed54Rg/v-deo.html It covers all of the attributes that can be applied. In this video, I review the Nextion Text box. I go over every attribute. I have a timeline below if you are looking fo...
190 Nextion accelerometer GY-521 MPU-6050 displayed on a waveform condensed
Переглядів 483Рік тому
If you enjoy the content, consider donating a cup of coffee at ko-fi.com/cheapcontrols In this video, I use a Nextion waveform to show the data from an accelerometer and gyroscope. There is a longer version where I go into more depth on the I2C connection to the accelerometer can is at this link ua-cam.com/video/VMHHdBPcxv0/v-deo.html There is more information on the topic on the Cheap Controls...
190 Nextion accelerometer GY-521 MPU-6050 displayed on a waveform full
Переглядів 882Рік тому
190 Nextion accelerometer GY-521 MPU-6050 displayed on a waveform full
188 Adafruit Metro-Mini w/TB6612 controlling a motor and a couple LEDs
Переглядів 401Рік тому
188 Adafruit Metro-Mini w/TB6612 controlling a motor and a couple LEDs
187 with Audio! Nextion Component Names versus IDs and how to loop through them with less code
Переглядів 1,3 тис.Рік тому
187 with Audio! Nextion Component Names versus IDs and how to loop through them with less code
186 Nextion twfile command part 3 larger random file sizes and larger random packet sizes
Переглядів 975Рік тому
186 Nextion twfile command part 3 larger random file sizes and larger random packet sizes
185 Nextion twfile command part 2 error state and split file uploads
Переглядів 939Рік тому
185 Nextion twfile command part 2 error state and split file uploads
182 Nextion #XSTR command and a reference to the rest reset command
Переглядів 1,7 тис.2 роки тому
182 Nextion #XSTR command and a reference to the rest reset command
181 #esp32 dynamic network connection with a #nextion #combobox
Переглядів 4,4 тис.2 роки тому
181 #esp32 dynamic network connection with a #nextion #combobox
180 #ESP32 #WiFi config and browser control of the Onboard LED #esp32 #tutorials
Переглядів 1,5 тис.2 роки тому
180 #ESP32 #WiFi config and browser control of the Onboard LED #esp32 #tutorials
179 Nextion #recmod command - this is the lastest in my #nextion #arduino #esp32 #tutorials
Переглядів 2,2 тис.2 роки тому
179 Nextion #recmod command - this is the lastest in my #nextion #arduino #esp32 #tutorials
178 Nextion Danger -- direct connect to #ESP32 #nextion sending negative numbers
Переглядів 3,9 тис.2 роки тому
178 Nextion Danger direct connect to #ESP32 #nextion sending negative numbers
177 #ESP32 WIFI with the #Nextion Display with a multi-line text object #best
Переглядів 6 тис.2 роки тому
177 #ESP32 WIFI with the #Nextion Display with a multi-line text object #best
176 Nextion Display tutorial waveform with min max number
Переглядів 4,4 тис.2 роки тому
176 Nextion Display tutorial waveform with min max number
175 Nextion display controlling and Arduino controlling a relay
Переглядів 3,4 тис.2 роки тому
175 Nextion display controlling and Arduino controlling a relay
174 Using the #nextion display with the #arduino without a library
Переглядів 13 тис.2 роки тому
174 Using the #nextion display with the #arduino without a library
I want to write a text, and save that text, such as Name: jsuendjdj I want to save what I put in Name
my nextion display got bricked during a fw update , can i buy new nextion and dump the .bin flash to the bricked one ?
thank you best nexation tutorials i want to five pages slidshow after one seconds what is the coding in nexation editor without arduino
Just want to give a big THANKS for your work - It has helped me a lot. If not for people like you, willing to help others, a lot of us would still be in the dark. I learn mostly by example and watching others. So again, thanks! I would like to send a donation to show my appreciation but wanted to make sure you are still active.
I'd like to increase the baud rate on the display. How the heck do I do that?
hello: Compilation error: 'Serial2' was not declared in this scope ????
Why do you add serial,write 0cff 3 times in a row?
Use static const int as variable for the pins to make clear what the meaning behind magic numbers are
What does Serial Pin 2 and 3 connect to from the Uno? I have an FTDI adapter on the way and I don’t want to screw it up. My setup is an Uno with the usb connection to a headless pi 4.. I’m attempting to catch what the pi sent over, in a separate serial monitor so I can debug my programming. I know the pi is sending the right byte array but I don’t know what’s happening on the uno end when it’s read
there is a cable that can be used to connect the raspberry pi usb or serial to the rs232 using rj45 connector?
what?
@@stellabckw2033 some inverters use serial rs232 protocol using an rj45 plug with 4 wires wired with a different pinout instead the normal com port. they don't know the meaning of the word "standard"
Hello Mark, I need help. I want to print multiple commands from Nextion to my ESP8266 but it does not work as I want. This is what I want printed. print "#ACTIVE MONDAY;" activeDay.txt="MONDAY" print "#PAG SCHEDULE_1;" each command is space-separated #Command Value; I have a function that parses it in my code, and everything works until I try to print multiple commands like above. Then I get this in my code: "Command: ACTIVE - Value: MONDAY;#PAG SCHEDULE_1" instead of "Command: ACTIVE - Value: MONDAY" AND "Command: PAG - Value: SCHEDULE_1" This is my code void Display::listen(){ if(Serial.available()){ String dfd = ""; delay(30); while (Serial.available()){ dfd+= char(Serial.read()); } if (dfd.startsWith("#") && dfd.endsWith(";")) { dfd = dfd.substring(1, dfd.length() - 1); // Remove the # and ; // Extract two space-separated strings COMMAND AND VALUE // 1) GET COMMAND String command = dfd.substring(0, dfd.indexOf(" ")); // 2) GET VALUE String value = dfd.substring(dfd.indexOf(" ") + 1); Serial.print("Command: " + command + " Value: " + value+"----"); Serial.print(NEXTION_END_STRING); // 2) Execute command handleCommand(get_command(command), value); } } }
Can you send all codes written as comment?
I tried many times but couldn't
Can you send me code and file HMI?
hey, is it possible to send, for example, a simple Windows application written in C# in Visual Studio, datagrid view tables, e.g. 5 rows and 5 columns, to nextion? What is the best way to do it, as a whole file or in rows?
Hey, i try the code and got an issue, its says motorDelay was not declared on this scope. I use esp32 for the board. Please help
I sent you the code a few minutes ago. Sorry for the delay
@@CheapControls awesome, thank you so much
That is the absolute 1st time anyone explained what a radian is so succinctly. I only understood radians by comparing to degrees before this. Thank you and kudos to you!
Glad it was helpful! This is video is a bit older. The main reason I make these videos is for my own use. I forget stuff so fast that I need these as refresher videos. I am glad they helped someone else.
Hi , My project has 4 page . I want to use chronometer, but timer is working just one page, other pages are undependent, do you have any idea about this siituation?
You could try setting up global variables on the pages that are not displayed and copy the timer function to each page. then you could update the other pages so when you go back they are showing what you expect. I am not sure this is what you are looking for but it is something to try.
Hook up the page change to the release event of the object and there is no problem.
That is a great observation.
This was INCREDIBLY helpful! I was able to get a 12v DC motor working with my L298N motor driver/Arduino because of this video! It’s so cool. THANK YOU 😊
Glad it helped!
This device does not support this component.
That is too bad. I thought it did.
i have timer with this screen but i want to make password if nobody touch screen within one minute
There are a few ways to do this. One would be to have the timer change to another page if it times out. That page could require a passcode to return.
@@CheapControls I hope to see this lesson from you By the way, the lesson I'm looking for is... The screen is lit, but when touched, the login page appears with a password for 30 seconds
I am making progress in understanding how to program the ESP32 and the Nextion. It is slow but I am making progress in a determined way. Now I cannot find any videos of sending a signal from the Arduino to different pages on the Nextion. If I comment out page 1 on IDE then there is no problem in getting the boxes populated from the Arduino to page 2 on the Nextion. Also when moving from page 1 to page 2, data from the Arduino is deleted on page 1. Have you experienced this or is it jut a feature of the Nextion? I currently have 6 numbers boxes that are populated from EEprom in the Nextion but can be updated and saved back to EEprom. I do like to see the same data coming back from the Arduino sitting in a column of number boxes alongside. To complete the project I am working on I need to have a second page of both number boxes and text boxes. At the moment I am stumped. Can you help? John
You have to set the box to global. Try this video ua-cam.com/video/jXpgeZ7cmRo/v-deo.html
@@CheapControls Thanks for the reply.. I had found that I had not noted them as Global myself. I am rapidly learning now and the latest stumbling block was to get some simple division to work. I discovered there is no such thing with Arduino and Nextion! I spent ages figuring out for myself how float values v int v long v string worked and by using numbers rather than cell references I eventually got it to work by trial and error, subsituting cell references for actual numbers and gradually it all worked. Thanks again for the various tutorials. John
Acho sacanagem a versão enhanced não ter combobox e recursos de listagem arquivos. É tudo interface gráfica. acredito que isto esteja limitado não por causa do processador GPU mas pelo software para nos obrigar a comprar a versão inteligency. Não se consegue plotar nada de diferente ou fazer melhorais na interface somente o que o software de componente proporciona. Se eu tivesse sabido disto antes não teria comprado o NEXTION e sim investido em outro melhor que possa usar recursos da LVGL. Vivendo e aprendendo. Ao menos serve para fazer coisas rápidas.
I agree that the Nextion is not the best for everything.
Excellent video!
Thank you very much!
Code
If you want access to the code, please submit a request on at www.cheapcontrols.com. Include the video number #194 in the request and we will email the code to you.
1)Why nextion display reseting value after power cut, what is the solution for this? 2)why esp32 can not read nextion values of the display during changing the page?
You can try storing values in the eeprom and then restore them on a page load. 2) I am not sure why the esp32 can not read the nextion values during a change of pages.
Thanks very much for the video, I am running the nextion in debug connected to my ESP32, I am getting a parse error on the simulator return... The MCU return is in the form: HEX(77 65 70 6F 20 32 34 2C 33 31 38 FF FF FF) STR(wepo 24,318ÿÿÿ) does the data from the MCU look correct?
All good! For some reason wasn't working in the debug window but when I plugged in the display it worked fine! Do you know if there is any way to plot a whole array of data at once rather then sending one data point at a time?
I am glad you got it.
"Dont fall asleep" that was funny. Once again clean and concise. Thanks
Glad you enjoyed
Because of this tutorial. I'm becoming more smarter. Thank you for the clear and concise explanation.
Great to hear!
Your excellent videos are what made me confident that I should be able to set up a Nextion tft with Esp32 demos d1 board. I have had no problem in placing buttons and getting them to interact as required. However I seem to be a bit stumped in getting anything to go from the Esp32 to the Nextion or vice versa. I have set up the code with 2 serial ports and so far have no errors compiling. I definitely do not have a hardware problem as I have duplicates of everything. I can compile the respective codes and download to both the Nextion and the Esp32. In going through your code in this #137 video, I have a problem with.... prints "val".0. which throws up an error code... Invalid number of arguments. If I enter prints n0.val.0 I I get 2 errors....Invalid number of arguments. I have tried going to your site and downloading and copy of your code to try but the link is not working. In you tutorial 59 you said that you couldn't get prints working. Have I missed something somwhere? Finally I have a wretched error message says invalid variables page. Actually I dont have one as I deleted it! so have no way of getting error free code. Can you help please. John
I have managed to sort this out. The.. prints."val".0 only works if you put the number of characters that the val is. i.e. ...prints"val".3 The prints n0.val,0 that gave me errors works but with .....prints n0.val,0 ...I managed to get rid of the other error message about variables by using an erilier version f the file and updating it. Incidentally in hex when checking the data going out to the ESP I saw that if you use values of less than 10 you can see the figures rather than the hex figures so it is easy to se if it is working correctly. I also had a good look at the Nextion instruction set to check for the correct way of writing the code. John
I am glad to hear you figured it out and I will take your other comments into consideration. I have not been able to work on the displays recently but I hope to get back into them soon.
you saved a heck of time
Glad we could help.
sir how you make pop up keypads on your screen please sir help me
That is a very involved question. You will have to submit a request at www.cheapcontrols.com for help.
Hello, I have a problem by changing pages. I have one button and two pages(page1 and page2) First the screen stays on page1. When button is pressed, it will switch to the page2. button not pressed. the page2 can't back page1. I tried a lot of time and couldn't do it. like this↓ val = digitalRead(BUTTON_PIN); if(val == LOW){ Serial.print("page 1"); } else if(val == HIGH){ Serial.print("page 2");
I am not sure. You can request help at www.cheapcontrols.com. We will reply and then you can submit your code for evaluation.
Thank you for the video, great explanation 🙏🙏🙏
Glad it was helpful!
Son muy buenos sus tutoriales!! Muy bien explicados. Me podría ayudar con una duda por favor, tengo un botón en mi pantalla Nextion, requiero que al presionarlo se ejecute una interrupción en mi arduino DUE, que instrucción puedo usar??. En botones conectados fisicamente se usa la instruccion "attachInterrupt". En este caso cual instruccion debo usar?
Sorry for the late reply. This would depend on the model of Nextion you are using. You can request mor help at www.cheapcontrols.com.
thank you, but i am strugle to sending text(string) can u explain it to me?
You have to go to www.cheapcontrols.com and request help.
Hello, link for the code is not working anymore, can you update it ?
You have to go to www.cheapcontrols.com and request the code.
Hello, thanks for the video, I'm able to make progress on my project. How would I approach selecting a particular SSID to enter a password for??
Sorry for the delayed response. SSIDs are individual to the location.
@@CheapControls Yes I know but what I mean is how our phone WiFi functionality works.
I am not 100% sure what you are asking. Let me know if this video helps. ua-cam.com/video/GeRNCvHebA4/v-deo.html
Thank you for all the videos you guys have made.
Our pleasure!
Maybee I'm stupid but howto connect the Nextion against the Arduino sry I'm a newbie 57years old
It depends on the Arduino. I use the Nano in most of my tutorials, but it would be the same for the Uno. I use a library called software serial and define two pins( usually 2 and 3) as a software serial port. I use those pins to connect to the transmit and receive on the the Nextion. Using an additional serial port allows you to keep the arduino connected to the IDE and use the serial monitor for trouble shooting.
You are only a couple of years older then me. Never to old to learn something new.
Bardzo Ci dziękuje. Od dwóch tygodni próbowałem połączyć Arduino Mega z Nextion. We wszystkich tutorialach był błąd w składni, dopiero u Ciebie jest poprawnie. Działa wszystko. Jeszcze raz bardzo Dziękuje.
Your Welcome, I am glad I was able to help.
Very Well ❤🤍💚
Thanks
why we are using 2 serial
One for the connection to the display and one for the programming port.
Very Well ❤🤍💚
Thanks for watching and taking the time to comment
Trying to find a way to upload new screen firmware from the mcu, not a pc. Any suggestions? Thanks
I do not know how to do that. If you figure it out let me know. It would be very interesting
Hello, I would like to ask some questions. I use the 2.4-inch expansion IO to output two channels of PWM to my expansion hardware, which causes the slider function of the touch screen to freeze. I have never found the reason. Have you encountered it? Can you give me some pointers? Thanks
The only way I could help with, is to see your code. You would need to go to www.cheapcontrols.com and submit a help request. Then we would interact over emaill.
Can you please leave your email address? Thanks@@CheapControls
when I put my code in arduino, the motor is running and app is not responding
That is too bad. I am sorry you are having issues.
@@CheapControlsI just did something wrong, video is great, everything is working as it should be ☺️
Was trying to make use of the Adafruit library for the PCA9685. I found your video quite useful to compare what you did vs. what the library was doing using a logic analyser, and thence to find where the library wasn't working right. I'd add as a note for anyone else who is coming along to this video, that you have to set the PCA to 'sleep' mode before you can change the PWM frequency from the default 200Hz to the 50Hz required by servos (Register 0xFEh, value 0x83h), and that the 'invert' bit in mode 1 is useful when driving servos . Thanks for taking the time to upload!
Thank you for taking the time to inform others on what you found.
uhmm..i fim taking measures from a sensor, every time i change page i should replot the whoel graph? so...i should store in my MCU memory all the datas then resend for each page change, am i right? thanks a lot
It has been awhile since I made this video but I believe the waveform is not stored on page change. Did you try to set it as a global? I think I once used the internal eeprom to store values.
thanks for your reply, i will try and update you@@CheapControls
i think eeprom is not a good choice in terms of endurance, if refresh is often requeried@@CheapControls
Awesome video, this is exactly what I've been looking for. Is the source code for Arduino still available anywhere?
Thanks for the compliment. You can request the files by going to the "need help" section at www.cheapcontrols.com
you are a HERO. nextion manufacture's help is so basic, you nail it RESPECT
Thank you for the compliment. I have not made a video in awhile but I do hope to start again.