I am trying to get arduino due working with nextion library but there is an issue with due not compiling it, does any one have a working code to do use using compatible sd library with errors.
thanks for your help in advance.
1) There is zero pressuring the other users for code.
You have started this thread by asking and not demanding, and if they want to provide you with code then it will be their choice to do so. If they provide tips instead, there is no "can you give me your code" - I will shut the thread down.
2) Understand how code comes about. It is not magic.
Arduino is Arduino .
Arduino Due specs
Atmel Arduino Due Manual - it is 1459 pages long
Arduino forum to ask Arduino questions is
Arduino programming guide lines
Nexton is Nextion
Nextion Editor Quick Start Guide
Nextion HMI Solution
Code is the representation of hard work, lots of learning and hard work
1000's of pages of learning go into good coding
So It is really not fair to the guy that did all the work to demand it from
him without doing any of the hard work yourself.
3) Ask Questions in the correct place
Arduino Question - Arduino forum
Nextion Question - Nextion forum
I will allow some spill over where the two mix, but if you don't know how
to debug Arduino C code, you will need to learn Arduino C. Somewhere.
Why does your code not compile with your MCU?
Have you configured it properly -> Arduino
Having issues porting it to your MCU - Arduino C
If I program in mikroPascal - I must check mikroe forums for answers.
You will need to learn Arduino C. Somewhere.
- Read the code
- Read the Libraries
- Read the Manuals
How did you miss Iteadlib Arduino Nextion Library readme.md ?
Note: the default configuration is for MEGA2560.
Is the library configuration changed for the Due?
START in SMALL BUILDING BLOCK STEPS
NexUpload is perhaps the most interesting to swap HMIs on the Fly
- If you are asking for code, can't figure out how to fix errors, this is
above your abilities at the moment. Start smaller, build up from there.
- All the mini steps for how to do an TFT file upload is documented
- I gave you the link to the public Upload spec
- I gave you the pseudo code
- I gave you the links to the NexUpload.cpp and NexUpload.cpp
That is more than enough to translate it into any language, but if you do
not know how to program - You will need to learn Arduino C. Somewhere.
THIS is what it takes to write code, THIS is why such is unfair that
someone comes arrogantly demanding working code without errors
and THIS is why I will shut down any thread that is demanding code.
That was someone else's very hard work, without any appreciation.
nothing more to add ...
Now, let start off with what errors you say you are getting.
- don't post a 1000 lines of compile errors, but look at those errors
C:\Users\Patrick\Documents\Arduino\sketch_jan02a\sketch_jan02a.ino: In function 'int upload_TFT const char*)': sketch_jan02a:67: error: no matching function for call to 'USARTClass::write(byte , int, int)' Serial1.write(ndt,3,8); ^
What version of the Arduino IDE are you using?
What board version are you using?
What port are you using?
What is the FIRST error - like the example I gave above
I used arduino ide 1.8 the latest but does not give me enough tools to track the debugging so i installed http://eclipse.baeyens.it/ and yes with that there are issues linked to the usb and sd card libraries, something is casuing such errors when using arduino due.
I program c++ for years beside other languages and decided to select nextion to get my project faster , it is a disappointment start for me as it is not about what i can do but it is about time cost in america and sharing knowledge, if nextion is unable to provide any support to fix this problem then let us know either we dump this product or we ask intelligent minds on freelancers.com to fix it for us for few dollars then I can post this here to help all. I do not think I made a mistake to ask for help and am still with open mind to appreciate the team work of good spirits.
Why the focus on NexUpload? Ditch it, and use the rest of the Library to actually do HMI. NexUpload was a highly specialized application for commercial customers provided as an example of how to swap out HMIs on the fly. But NexUpload is assuming you can already handle the Nextion in not one HMI, but several HMIs to swap out on the fly.
You have a conflict in your statement, you have been programming c++ for years. I too have been programming for years to, so why is it I can write the upload in procedure base as I stated yesterday and finished in under 30 hours while multitasking and sleeping and you have not? As I have stated I am a pascal programmer, C++ should be much closer to Arduino C than pascal is. But your big conflict in your statement is not this, the big statement is the nextion to make your project faster.
The nextion is a simple serial device. Push a char or byte over a TX line and receive via an RX line. This is so basic that your specs don't make 100 page manuals for such, they simply describe what has to be pushed out. This is clearly provided in the Nextion Instruction Set. This really doesn't have anything to do with your programming of the Nextion - it has to do with your ability to handle the MCU you are tasked to work with. And yet again Arduino - see Arduino and Nextion - come see us at Nextion.
How to hook up an SD card has everything to do with interfacing your MCU and the microSD card. Since the microSD on board the Nextion is only used for manual upload to the Nextion device and can not be read during HMI runtime or written to HMI runtime, then this onboard the Nextion device microSD can not be the one you are having difficulty interfacing with. And if it is not this one, then it has to be what you are trying to interface on you side and your MCU. But this is again beyond the scope of Nextion and Itead .. this is your project. I hardly see how this becomes my responsibility - I am not responsible for your SD card interface, nor in selecting your chosen microSD, nor in the Arduino board, for these is their respective manufacturers. I also am not responsible if the user wishes to use a temperature sensor ... this is not Nextion that you speak of but problems outside the Nextion device. Do you also blame your Cable company when your car does not start?
Where the Nextion kicks butt and makes the project nicer is
1) few lines to connect a display - RX/TX - two wires.
2) A HMI device that is far cheaper than the Samsung $1000 solutions
2) Resources display side of that RX/TX. Sending picture pixel data over RX/TX at slow bauds would not be a benefit, the fact a 800x480 background can be changed in less time than it takes to send 3 characters over TX/RX - now that is powerful. The fact that the Nextion is also able to perform logic RX side - that is powerful.
Itead is most certainly providing support for the Nextion and more than they could have bargained for when they have arranged for Gerry Kropf and myself to look after technical support and the forum. Sorry, I am not being arrogant, but few would be able to afford to Gerry or I, let alone team both. I have been taking the Nextion to its limits and disbursing knowledge for 6 months now, and ask many here if I haven't helped them get over their hurdles.
You speak of time cost in America, you have no idea about time costs. The bill rate for me to cut time costs is very nice indeed - and the amount of time I spent to provide you the direction you needed to accomplish NexUpload - of which you wasted by not applying any of this knowledge I gave. Sharing Knowledge is about knowledge, not about me doing your typing.
But sorry, your statement is either trying to be either naïve or pretty insulting. What kind of statement fashioned around some threat of being dumped or do it or else is ever suppose to motivate me to do your work? Sorry, I don't pimp myself out on Freelancers.com, so if you think you may have better luck there finding someone who knows all I know about the Nextion - best of luck, I have no insecurities about my abilities. How will you be able identify the Intelligent minds on Freelancers when you miss the intelligent minds that have responded to you on this forum?
But threaten to dump, rattle your sabres. We are intelligent enough to not be pressured, coerced and bullied into doing your tasks for you. I don't mind if your go to Freelancers.com and get some script kiddies to fix your Arduino Due. What does it say about your supposed years of supposed programming skills? No matter how much I read the Due 1459 page manual it won't help your understanding of it. Paying a freelancer to write code, doesn't make you a better coder.
There was nothing wrong in asking your question, but it crosses the line when you again want to take some stand to try and coerce someone to do your code for you. Ultimatums of dumping ... coercion. Do as you will, I still don't write your code for you - nor do I ask of others to undertake the task.
It probably also crosses the line to blame Nextion for your SD card. There are also well defined demark points, Nextion side of the RX/TX pair is display side - this is my domain and my responsibility. MCU side of that RX/TX pair is your responsibility.
Tell your boss the reason why you ditch the Nextion is because you can't interface an SD card and are unable to interface that information in the vastness of information via Google. Hire your script kiddies on Freelancers, they will be able to drain your budget. Dump the nextion, pay the 1000 dollars for the Samsung. Perhaps your boss would like to ditch other products in his product line because your tire pressure on your car is low. Or it was raining at 2:37 in Melbourne
Thinking about it, if I were you, I'd probably try and hide the fact it was because I couldn't get my SD card working. Your boss is more than welcome to contact me and I will explain the situation to him - firstname.lastname@example.org
actually i am the boss myself and we do embedded solutions and now mainly in automotive and yes we used cheaper spi tft lcds , as far freelancer.com that place was a great help for us I get things done in few days dealing with great minds from all the world and share my load with many , as far nextion yes it is very cheap intelligent product compared to other intelligent costly gpu lcd solutions, i am interested to know more about your development of the enhanced ones and who know maybe in the future will develop libraries to control the smt32 mcu with gpio, I am not upset still like your product and will sort out what i need from freelacner and even may help your customers for free once i get my this product i am working on ready. usually i close developing one complete product by myself before I seek others to fix their own product. thank you for your reply.
So I have to ask again -- why the focus on NexUpload?
If you haven't made several HMIs yet,
... is there a reason to swap out on the HMIs out on the Fly?
NexUpload.h and NexUpload.cpp are an application, not the library.
If they are your barrier - delete them both from the library folder.
When you are at the point of needing on the fly swaps - reinstall NexUpload
They will always be located on github when they are needed.
To me, perhaps your eclipse add-on has brought you more complications
at a time when it complications is not what you need.
Try the Arduino 1.80 IDE
Install the Due via the board manager
Download the github library for Nextion
Delete the NexUpload .h and .cpp pair
Edit NexConfig.h and ensure nexSerial is Serial1
(or Serial2 or Serial3 as you wish)
And circle back to NexUpload at a later time.
I am sure somewhere between now and Many HMIs you'll fix your SD issue
ok will try it with arduino ide only, i need the nexupload to work so i can program that feature as a menu in the hmi application and then delete it after that not to to interrupt the work of the lcd even the sd card still inserted. will try spend some hours next week to make some experiments on it.
i am just trying to find practical solutions for my customers to update the products easily in the same time find a secure measure to encrypt the hmi tft file not to be hacked . the problem is you did not incorporate any security features to secure it. I do like your products also i have to make sure what ever i develop using nextion is going to be secured also at least from my side.
I do not have any problem with the rest of the code, everything is working fine and really impressive.