I am running the latest IDE for both Arduino and Nextion the Nextion sreen is receiving information/commands however is not sending any touch screen commands.
I have successfully run the touch screen calibration procedure and this didn't correct the issue. I have also tried new screen and have the same problem. I triad loading some previous projects and these are no longer working (The last project was updated in May16 and there have been half a dozen of these replicated and working. The problem seems to have started when I have worked on a new project and updated the Nextion IDE even now using and old version of the tft file from the May project and loading this into the display it no longer works nor have I been able to get the examples in the Nextion-master to work either old or newly downloaded.
The touch screen appears to be working locally but not send the touch commands back to the controller (arduino) the touch screen receives commands from the controller.
The Nextion firmware is now being upgraded with the newer compiled TFTs.
You can test to see if the Nextion device is sending through the Debug Simulator
By launching Debug for your HMI source and installing the corresponding TFT on your Nextion device
- switch the Send command to: from Current Simulator to Simulator and Nextion Device
- Connect to your Nextion - this will show in the Debug Status Bar at bottom.
Then sending a command in the Instruction Input Area
should also show any Nextion MCU return codes in User MCU Return Data
As well as some small changes in the Nextion, there have been some changes in Arduino as well.
OK thanks sorry for the delayed reply but I needed to get a USB to serial converter so that I could hook the Nextion screen up directly to the PC.
Nextion is now powered from the USB adapter and the TX/RX lines connected.
Using the Nextion IDE "debug" mode I have been able to connect to the Nextion Screen (the Auto Search function didn't find the right Com port and I had to manually select the port). In my case port 13 see bellow and note the option now to disconnect.
Now when I press the touch screen buttons I am receiving the return commands from the Nextion Screen back to the PC so this tells me the Nextion Screen is OK and I may have an Arduino or wiring issue thanks for you help.
This has not solved the problem, Now that I have a direct connection from the PC to the Nextion screen through the USB adapter I did try uploading the the HMI file to the Nextion and while doing a txt box informed me that the firmware would be updated so I assume when I'm using and SD card to upload the tft build file it doesn't upgrade the firmware and if I use the USB to upload the tft build file it does can you confirm this?
I was hoping the firmware upgrade would then solve the problem but it doesn't. Assuming now that the touch responses are being sent back from the screen so the screen is still receiving and I assume using the debug and USB connections that the Nextion Screen is send a touch response but its not being recognised by the Arduino. I have attached the code, which was working and seems now with the Newer Nextion IDE and the Nextion Screen firmware old and new is no longer working.
The commands I'm using in Arduino are typically;
String message = myNextion.listen();
if (message !="")
if (message == "65 0 1 0 ffff ffff ffff")
The firmware upgrade is integrated into the TFT and is updated regardless of serial or microSD.
Thanks Patrick did you get the chance to look at my code and see why I am not reading the return responses from the Nextion Screen?
I have tired updating my Library files and though the problem may be in those it would seem I have used https://github.com/bborncr/nextion for the projects I have done to date assuming it was the OEM version of the library as its file name is nextion.h I have now removed this library and installed the https://github.com/itead/ITEADLIB_Arduino_Nextion library.
My old arduino projects wont compile so I tried then to load the examples that are provided with the https://github.com/itead/ITEADLIB_Arduino_Nextion library the arduino code loads and compiles OK the first two example nextion HTM files do not load and crash the nextion software (CompButton and CompCrop) the next example CompDualStateButton lads OK once the objects are relocated to suite the screen size Im using.
The nextion screen is not comunicating the button does toggle on the screen but there is no text change following is the serial monitor output which I think is telling me I have a "receive return command error"
I get the same result from some of the other examples helped needed please
Some additional information all the example HMI files when being compiled warn they are being compiled to the newer version (see below) and it would appear there is problems with the examples;
CompButton = Crashes while trying to load (see below)
CompCrop = Crashes while trying to load
CompDualStateButton = loads OK but doesn't communicate (see previous post)
CompGuage = loads into editor but will not compile and has compile errors
CompNumber = loads OK but doesn't communicate
CompPage = Crash
CompPicture = Crash
CompProgressBar = Loads OK but doesn't communicate
CompSlider = Loads OK but doesn't communicate
CompText = Loads OK but doesn't communicate
CompTimer = Loads OK but doesn't communicate
Folling is the crash message;
Following is the message when HMI loads OK but compiles
Not sure what you mean by XP, Im running windows 7 professional service pack 1 if that helps
Yep, that helps
Nextion Editor v0.38 and above have issue with versions below v32 and earlier.
Too many changes in the newer versions that just don't make sense for backward compatibility that far back. So examples that are very old ... yeah - don't use them anymore.
I have to question the wiring and proper power supply of your setup when you are failing to communicate.
- have you made sure your Nextion is being provided with the proper power supply? You can check the data sheets for your version from the Nextion page https://www.itead.cc/display/nextion.html
- Some Arduino's just don't provide enough current to drive the Nextion
- ensure that your grounds are common when communicating between Nextion and MCU.
Just some things to check for.
And ensure that you are using v0.41 of the Nextion Editor.
Also ensure DotNet3.5 minimally is installed. Update if need be.
Confirm current Nextion editor version is v0.41
The voltage with the nextion connected is 4.88V and above the minimum 4.75V without the nextion connected it is 4.96V
I have tried 3 different Nextion screens all provide responses using the PC to serial none when using Arduino.
One of these screens was working fine (as it has connected to my bread board test bench) and the problem has only happened since upgrading Nextion editor
I downloaded and reinstalled DotNet3.5 and then recompiled the HMI file and uploaded to nextion but have the same problem should I reboot?
I would reboot certainly