Hello all. I'm new to trainboard and DCC. I started dabbling with the classic dcc++ last year on both arduino uno then mega 2560. Had it working with JMRI USB on Windows 10 via mega 2560 with L298 clone motor shield. All worked well. I am currently revisiting this project after a 1 year gap and noticed that things have moved on with DCC++ EX that has risen out of the original DCC++ project. So I have downloaded/compiled and loaded DCC++ EX onto my mega2560 and all went well commanding it via USB from JMRI. I'm now in the process of trying to connect an esp8266-01 to use as a network connection for the mega (replacing USB). My questions are: 1) Where can I obtain a working sketch for my esp8266-01 that is fully integrated to the dcc++ ex code running on my mega2560? I have looked on github repository https://github.com/DCC-EX but cannot see anything relating to esp8266 sketches. 2) Am I correct in connecting serial from esp8266 to uart 1 (ie tx1/rx1) on my mega (via level shifter) and just expecting it to work? (I had a quick look at the EX code, and it appears that, at startup, the mega attempts to communicate with the esp8266 in order to connect to a wifi network (ssid/password) on 3 uarts, before timing out if unsuccessful, but maybe I'm wrong. Any pointers would be useful as I have spent some time now on connecting up the 8266 and I am not making much headway. Thanks! Chris BTW I like the look of the EX project and appreciate the effort that is being put into it!
Update on my revisit to the DCC++ project: Having reviewed my options since my first post, I have changed tack and moved to the Atani ESP32 hardware option. I had a spare ESPDuino kicking about allowing me to just continue with a two-module (esp32 plus L298 motor shield) solution rather than three. Arduino mega, motor shield and ESP8266. It's early days yet, and it took a while to build the necessary s/w toolkit environment for the Atani approach, but I now have a working ESP32/L298 Shield system to continue my investigations into DCC++ I may revisit the DCC++ Ex solution as it would be great to see the systems side by side. Considerable effort appears to be going into the two main evolutions of Greg's original DCC++ project. Thanks to those that have taken time to read my first post, and I am still interested to hear how others have connected an esp8266 to a mega2560 to produce a fully wireless accessible DCC controller.
Further update (for those interested). I have been playing with Mike's ESP32 Command Station project and I like the ESP32 + L298 Driver shield approach, especially as the wifi connectivity is useful for my usage. Note that I am not so worried about LCD displays. But I may change my mind on that one . The inbuilt web server controller is a nice touch, although I am testing with JMRI. I have also built a DCC++ solution based on a Mega2560 + L298 Shield running the original Gregg Berman firmware which I refer to as classic, as I wish to use this as a standard to check out a couple of 'funnies' I have experienced using Mike's ESP32 system. Not happy with two systems, I have another L298 on order to allow me to connect up a further Arduino Mega2560 which I now have connected to an ESP8266-01 using software I discovered in DaveT58's post https://www.trainboard.com/highball/index.php?threads/updated-dcc-code-and-esp8266-wifi-code.124835/ which has enabled me to drive a mega2560 via WiFi. It appears that DaveT has modified GreggB's original code to achieve ESP8266 wifi access. From a cursory look at DaveT's code, he added support for UART 1-3 and provides an ESP8266 sketch that provides a serial link into UART3's TX/RX pins. I can confirm this works fine and I can connect to this system (the DaveT system) using JMRI over a network link. I am thinking that I may also revisit connecting the esp8266-01 to the DCC++Ex software running on a mega, but I need to confirm that the Ex software accepts commands on UART1 thru 3. A post from FlightRisk in the DaveT58 post referred to above would seem to confirm that this is the case. I think it may be interesting to have three test systems running side by side (by side). By the way, my model rail hardware is very modest for testing. Just a short stretch of straight track. Chris
Sure. Just submitted this -> https://github.com/atanisoft/ESP32CommandStation/issues/80 It may be an issue with my new build/setup. But I have tried to rule out as many variables as possible. Chris
Thanks, I'll take a closer look at it soon. I haven't observed the slow response rate but it is possible there is a bug in there somewhere still. I mostly test via the LCC interface using the UWT-100 (mostly due to it's very strict timing requirements). We can also discuss your issue over on the ESP32 CS topic since this topic is for DCC++EX.
to answer the question from the topic: DCC++EX CS uses the "AT style" firmware on the esp8266. Usually the ESP-01 modules come preflashed but there is a little catch: depending on the version the manufacturer chose the default baudrate differs (9600 vs 115200).