While you're at it Dave, A Power On/Off (panic button !) would be handy too. In other news, I've been tinkering with my own throttle code, adding the function key set already described. I always endeavour to improve things to something light and efficient, and to that end, came up with what I think is a novel way of handling communication of Nextion key touches, back to the Mcu. If anyone is interested.......... Steve.
Steve I'm interested ... using a lot of Loksound decoders many of the functions are above 9 and so if we can find room on the screen (or on another page) it would be helpful to have a full range of function buttons. Steve F
Steve - Panic button was in the original throttle - I just need to put it back - on the other throttle if you press CHANGE DCC ADDRESSES the first thing it does is to send a <0> which shuts down the DCC++ power to the H-bridge. dave
Dave, That can't be good if you want to change on the fly, mid session, without shutting down the layout. Steve.
Hadn't thought of that - I will need to send a speed zero to the loco whose address is being changed I have another method that I may explore to kill all power - thanks! dave
Steve, Of course that is doable, and by all means anyone is welcome to use my code example. However, my main focus will be to develop my own design which is somewhat different to Dave's. Mine is full duplex over WiFi, and next up will be something like CV read/write or Turnout control. I've got heaps of room and processing power to go at on the ESP. Steve.
Dave, This feature didn't seem to work for me in my tests, I didn't dwell on it, and it could be that I'm using a different type of encoder. There was a delayed effect to output, so that when you go fast not every value is sent. However to get from 0-120 still took 120 clicks of the encoder fast or slow. Can you check it works at your next session with the throttle. Thanks Steve.
Gents - I spent the morning going over the code and the Nextion screens and have what I think is a pretty functional version on my web page (it is version 3.12) I have added an ALL STOP - this is done by pressing the top of the throttle screen (where is says DCC++ Throttle) - that resets all speeds to zero and turns off the DCC++ power. I also added a return to zero speed for the train under control - to so this just hold the throttle knob (which is normally used to change direction) for one full second. Note that the throttle speed graph scrolls from left to right as you hold it to remind you of what you are doing. When the graph hits the right side the speed goes to zero. For now I am setting aside additional development to work on other projects - I don't want this to turn into a job! thanks dave
I gather that you are referring to the variable speed on the encoder - I just checked it on version 3.12 and it is alive and well! dave
Steve I inserted the "zero loco speed" code (Note to all: you have to declare "directionFlag")from Daves latest iteration into what I now call a modified Ver 3 (which is Ver 3 with your changes) and now have a working version with the "press encoder for one second" to zero a loco speed....... and am loving it. I couldn't get the "kill" code to work which kills all loco speed and turns off power .... not a problem, as I don't feel the need for that. Patiently awaiting your WiFi throttle with full function buttons. Steve F
Steve - good to hear you got it working - note that the ALL STOP will not work if you don't update the Nextion screens (the HMI or TFT file) Enjoy! dave
I just bought a "4.3' Nextion USART HMI TFT LCD Display Module for Arduino Raspberry Pi" off ebay, as it looked like a good deal @ $47.39. Now I just have to download the Nextion IDE, and figure out how to make it work. it is coming from China, so it will take a bit to get here. I am super excited that I was able to afford one. ~Travis
Steve, Can you contact me at this address mj432126@yahoo(dot)com I will then be able to send Hmi files and such. Regards Steve L.
Good day, all - I am not sure if this is one of those deals that are too good to be true but I just ordered a 3.5" Nextion display for $12.99 with free shipping. http://www.ebay.com/itm/3-5-Nextion...876885?hash=item2a705ea395:g:ApUAAOSw0UdXr082 Might be worth a try. dave
Dave, Amazing price but..... Not clear on this crucial info NX4832T035_011N (N: No touch) or NX4832T035_011R (R: Resistive touchscreen) Steve.
Good point, Steve, but the description on eBay specifically include the lines below. For the price it is worth a try so I ordered one. thanks dave It's easy to adapt Nextion family HMI to existing projects, you just need to provide it a UART. NX4832T035 is a powerful 3.5'' HMI, which is member of Nextion family. Features include: a 3.5" TFT 480x320 resistive touch screen display, 16M Flash, 3.5KByte RAM, 65k colors. Features 480 x 320 Resolution RGB 65K true to life colours TFT Screen with integrated 4-wire Resistive Touch Panel
Yup, Even the photo's bear that out. If you receive a touch version that is an astonishing price. Fingers crossed. Might take a punt myself.
Maybe it’s the gambler in me, but at $12.99 which is way less than a valet park at dinner …… I’m in as well. By the time it gets here I’ll be ready for some 3.5” projects. Steve F