Modifications to Dave Bodnar's DCC++ Nextion Throttle

NormHal Jul 16, 2017

  1. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Norm
    I have a Nextion 3.5 that I bought waiting to have a more large area display, but now the HMI dont match with my display
    Is there a way to convert the HMI ( I dont understand HMI programing ) for this new dimension.
     
  2. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    Hi @jbsorocaba, sadly, all the work has to be re-done for each version of Nextion. I have however, done the re-work while contributing to @Atani's ESP32 Command Station. I used a more "convertible" version and have provided versions which use the extra space of both the 3.5in and 5in versions of the Nextion. To achieve this I had to sacrifice Dave Bodnar's background image and redo all the buttons, but the result IMHO is still acceptable. If you're interested, download @Atani's ESP32 code, and take a look in the Nextion' folder. There you will find the versions for 6 Nextion models. Let me know what you think and I'll attempt to convert the 3.5 in version to work with Dave's code... Are you using an enhanced or basic version?
     
    Atani likes this.
  3. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    It should be fairly easy for me to adapt the ESP32 HMI file to work with the Arduino Throttle. I think this would be a better option than trying to convert the original 3.2in version:)
     
    Last edited: Aug 13, 2019
  4. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Hi Norm
    Thank you for your prompt response. I am using Nextion 3.5 basic with 16 woo woo woo of flash memory
    I appreciate what you can for me, without a lot of work
    Thanks
     
  5. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    I'll see what I can do - it's been a while since I worked on that old throttle:-(

    If you've looked at the ESP32 project, you'll see that the HMI files no longer use a background image. That was the major reason why it was only done for the 3.2in models... I have the day off tomorrow, so let's see how far I can get:)
     
  6. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Thank you for your attention.
     
  7. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    Hi again,
    I spent some time looking to see what can be done, and it's not going to be as simple as I had hoped:-(. Using the ESP32 Throttle as a base will most likely result in a "not too attractive" solution, and it will carry over a lot of my "bad" programming. What I'm going to try to do, is two phases. The first will be to provide a temporary HMI file which you can use on the 3.5in Basic Nextion, but will (hopefully) work with the current Arduino support code without modification. I can't promise how soon I can achieve this - all I can ask is that you be a little patient:)

    The second phase will take much longer, but the goal is to make the ESP32 Throttle and the DCC++ Throttle either the same, or as close as possible to each other. This is going to require a major re-write and re-think of the original Arduino code. We have progressed quite far with the ESP32 version - with interactive adding, editing and deleting turnouts, and so on, which will most likely not be possible with the Arduino based version.

    Another option for you, is to acquire an Arduino form factor ESP32 board (WeMos D1 R32) which can use the standard Arduino Motor Driver board:).
     
  8. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Hi Norm
    What I realy want is a HMI 3.5 to operate with normal DCC ++. It could be your, from Bodnar's or someone else's.
    I built a DCC ++ with Arduino mega wifi ESP8266 from WeMos which I can operate via Withrottle or Z21 mobile, with ipad or iphone. But what I realy want is a standalone system that can operate with this DCC++ and Nextion display, or eliminating the radio and / or ESP connecting directly to Arduino in a bench system.

    I liked your HMI system, especially the 2D version 4.01. Unfortunately HMI is for Nextion 3.2 If it is easier to "resize" the HMI, would be ideal

    Thank you for attention
     
  9. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    This is the sad part... The backgroung images which are used to define the "buttons" are all based on bitmap images for the 3.2in displays. If I could find a way to "resize" those bitmaps we could have a solution. I haven't (yet) found a way to do this. I'll try to export the images as .png files, and then resize. There will no doubt be a loss of quality:-(
     
  10. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    I really appreciate your effort to help me
     
  11. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    Some good news at last:) I managed to convert the background images to 320x480 format - fairly simple procedure. The result is quite good, but I'll have to complete the HMI first before assessing the final result. What remains is re-sizing all the button objects to comply with the new backgrounds. Later today I'll mock up a very simple and incomplete HMI so you can judge what it looks like:)
     
  12. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Great job Norm
     
  13. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    So here's what it'll look something like. If you get a message from the Nextion Editor which says "Invalid Resource File" or something like that, you'll need to download the latest Version 0.58 of the Nextion Editor. Don't expect this HMI to work properly, I still have to adjust all the cropped image co-ordinates for the larger screen area:)

    (Removed premature HMI)
     
    Last edited: Aug 15, 2019
  14. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Norm

    It's perfect
    I thought you were going to change your 2D 4.01 project.
    Thank you
     
  15. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    It went fairly well - here is the complete version ready for testing:)

    Also removed the premature HMI...
     
    Last edited: Aug 15, 2019
  16. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    When I found I could re-size the images, and the quality seems OK, I thought why not take the quickest route. It's a much larger project to consolidate the two versions...

    Just BTW, I haven't yet programmed the HMI into a Nextion - will do so in the next hour or so when I get home from work...
     
  17. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    I just noticed an error - On Page 4 it says "Acc2" but should say "Acc1" - will fix it up a little later...

    I've also noticed I (again) messed up when zipping the HMI. I (try to) use OneDrive and I keep getting the wrong folder...

    The next post will be the correct version with Page 4 fixed as well:)
     
    Last edited: Aug 15, 2019
  18. jbsorocaba

    jbsorocaba TrainBoard Member

    47
    33
    13
    Don't worry about me. Time is not a problem.
     
  19. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    Okay, let's try again...
     

    Attached Files:

  20. NormHal

    NormHal TrainBoard Member

    138
    126
    12
    Where on this wonderful planet are you?

    I've also had great difficulty pronouncing jbsorocaba :)
     
    Last edited: Aug 15, 2019

Share This Page