#4.e - Adding an LCD Display to DCC-EX

  Рет қаралды 11,471

DriverDTrains

DriverDTrains

Күн бұрын

Пікірлер: 61
@edwardaudet8367
@edwardaudet8367 Жыл бұрын
Excellent!!!!! I jumped ahead and added my LCD screen, I had a 2 line on hand, I'm sorry I didn't wait for your video to come out. I have my DCC-EX command station in an old PC power supply, power supply went bad on a friend's computer, and after replacing it, I asked him if I could keep the dead one. I wanted a fan to cool the DCC-EX station. I have to admit it works like a charm. I started with the original DCC++ system and when I saw the DCC-EX system, I jumped on it. I've been into trains since 1978 when I got the bug for the hobby, I started with HO, but moved to N scale. I started my electronics career in 1967 during the Vietnam war and continued in the technical career till 2012 when I retired, I worked on equipment that was older than the hills all way up to Cisco equipment. I'll admit I am learning a lot from your series of videos, there are always new tricks to learn. Thank You and keep them coming, you're an Excellent Instructor and teacher. {I used a EP01s board with a carrier board for my Wi-Fi on my second DCC-EX machine. And this does work well.}
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you so much for your kind comments, and sharing your stories. I'm glad to hear your system is working well, and happy to share any tips I can. If you've seen my video #2 you know that I've been involved in the hobby on and off at various times throughout my life, but with various moves and family haven't been able to really stick with it for long periods. Right now I'm happily enjoying my little 1'x6' switching puzzle and thinking of ways to upgrade it. But gotta make a few more videos first hi hi. Thanks again! DD
@geraldstewart
@geraldstewart Жыл бұрын
A very effective tutorial. The step-by-step views were very easy to follow. A great asset for Newbees and retired Technicians like me. I am looking forward to your video on adding commands to F-keys. ie: Join and Unjoin. I love DCC-EX, I have been using it for 2 years. Keep up the good work
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you very much for your kind comments. I'm glad you are enjoying the videos. Great to hear that DCC-EX has been working well for you for 2 years now, and glad I can offer something new. I'll be working on the automation video soon. Thanks again! DD
@VictorianMaid99
@VictorianMaid99 28 күн бұрын
I love this. I might work this today!
@DriverDTrains
@DriverDTrains 26 күн бұрын
Thank you very much for your kind comments! I'm glad you enjoyed the video. Hope you made it work! Good luck! Thanks again and happy railroading! DD
@nigelbadley1004
@nigelbadley1004 Жыл бұрын
Super video explanation, clear and concise with easy to follow instructions, looking forward to further videos to help a novice (me) enjoy the benefits of DCC-EX, thank you 😊
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you so much for your kind comments. I'm glad you enjoyed the video(s) and found them helpful. I'm working on the next one (and the one after lol) and hope to have it ready soon. Thanks again! DD
@metsleeth5369
@metsleeth5369 Жыл бұрын
I have been waiting for this video and you did not disappoint.
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you very much for the kind comments and glad you enjoyed the video. I'll circle back around to the LCD again in the future, but have a few other areas to tackle first. Thanks again! DD
@PSandS-Nscale
@PSandS-Nscale Жыл бұрын
Fantastic series, thanks for all the information presented here. By following along from the first video I have been able to get my DCC-EX up and running. Now I need to get the LCD display. I will be watching for the next vid and keep up the good work. Thanks...
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you very much for your kind comments. I'm glad to hear that the videos have been helpful and you've gotten your DCC-EX system up and running. Good luck with the LCD next. I think you'll find it very helpful. Thanks again! DD
@BriansModelTrains
@BriansModelTrains Жыл бұрын
Brilaint. More treats for Scratchy C. Looking forward to more videos.
@DriverDTrains
@DriverDTrains Жыл бұрын
Always appreciate the kind remarks, and Scratchy always loves treats! : ) Thanks again! DD
@lestaylor7767
@lestaylor7767 Жыл бұрын
Many thanks for your video's, you have helped me big time. Now using the driver board for the first LCD display, realised that on the motor shield you have 2 sets of pins for the LCD so this will be a help moving forward when I add the 2nd LCD. Looking forward to you releasing your next video's.
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments. I'm glad you enjoyed the videos and found them helpful. Good luck with your second LCD! Thanks again and I hope to have more videos out soon. DD
@lestaylor7767
@lestaylor7767 11 ай бұрын
Hi, I wonder if you are near to releasing your next video showing how to program the 2nd LCD display? I have been trying to achieve this but struggling so would appreciate some guidance please, I only need the code?
@DriverDTrains
@DriverDTrains 11 ай бұрын
Thank you for your comment. It can be a little tricky getting the 2nd LCD hooked up. Here are some things you need to do: 1. Make sure you change the hardware address on the 2nd LCD so it is not the same as the first one. Otherwise it will just show the same text as the first LCD (unless that's what you want). You do this by soldering across the A0 (or A1 or A2) pads on the IC2 backpack. If you solder the A0 pads, it will decrease the hardware address by 1 (so for example from 0x27 to 0x26). If you solder the A1 pad, it will decrease by 2, and the A2 pad by 4. 2. To activate the 2nd LCD in DCC-EX you need to add a myHal.cpp sketch to your DCC-EX package. You need to find the CommandStation-EX folder on your computer and duplicate/rename the myHal.cpp_example.txt file to be myHal.cpp. Then open DXX-EX in the Arduino IDE. 3. You need to uncomment the #include "IO_HALDisplay.h" line in myHal.cpp 4. Then you need to uncomment the HALDisplay::create(2, 0x26, 20, 4); line. Note that the version in the example is not correct; it is missing the ::create part. I have included the correct text here (also on DCC-EX website bottom of the page here: dcc-ex.com/reference/hardware/i2c-displays.html). NOTE that I have changed the 27 to a 26 as described above assuming you soldered across A0 pads. You can now display messages on the 2nd LCD using the SCREEN command in EX-Rail automation scripts. You can find those here [basically its SCREEN(display#, row#, "message")]: dcc-ex.com/ex-rail/EX-RAIL-command-reference.html#communication-and-display-functions The display number matches what you use in the HalDisplay command in Step 4 above (2 in that case). Note that displays are numbered 1, 2, 3, 4, etc. while the rows of text on the displays are numbered 0, 1, 2, etc. Also note that the additional displays do not scroll or swap pages the way the regular LCD screen does, so you only get 4 lines of text (not 8). Hoping to find a way around that. Also unfortunately there is not an easy way to use these commands or extra screens outside of EX-Rail. It can be done in the myHal.cpp but that is way more complicated. I can walk you through an example if you want once you get the display working. Hope this helps!! Let me know how far you get. I'll may be able to post some images in a community post this weekend. Thanks again! DD
@lestaylor7767
@lestaylor7767 11 ай бұрын
@@DriverDTrains Many thanks for taking the time to help me, hopefully I can make progress
@DriverDTrains
@DriverDTrains 10 ай бұрын
Hope you were able to get that 2nd LCD working. I'm currently in the middle of my video series on JMRI but will eventually get back to making a video on adding additional displays to DCC-EX. Good luck, and all the best! DD
@philnewman1110
@philnewman1110 Жыл бұрын
Great video, it’s all starting to come together now, well done!
@DriverDTrains
@DriverDTrains Жыл бұрын
Thanks again for all the kind comments. I glad it's still making sense! ; )= To think that when I started on Video #4 in June I thought I could cover the entire DCC assembly and configuration process in one video lol. Thanks again! DD
@mikep4199
@mikep4199 Жыл бұрын
Thank you so much for this very easy to follow step-by-step! Can't wait to learn how to control signals, lighting, and other items!
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you so much for your kind comments. I'm glad you are enjoying the videos. I am working on the next one and hope to have it done soon. Thanks again, DD
@gavintheurquhart
@gavintheurquhart Жыл бұрын
What incredible videos! Thank you for really clear enjoyable and informative videos. Very grateful for the help you have been to me. I was beginning to dabble with DCC-EX when and felt like my head was in a fog. However your videos seem to answer every question as I ask it. Really appreciate your thorough approach that answers all the side questions too. Very much looking forward to the next videos. Thanks again.
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you so much for your kind comments! I'm so glad that you found the videos helpful. DCC-EX is definitely a project more than a product, but that's the very much in line with the character of model railroading. Enjoy, and I'll have more videos coming soon. Thanks again! DD
@michaelmatsumura422
@michaelmatsumura422 Жыл бұрын
When are you going to 4f??? You’ve got me going and waiting for more. Thanks! 🚂
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments! I'm glad you are enjoying the videos. I am busy working on the video for 4f about the Wi-Fi firmware now, and have a bunch more lined up after that. If you need to check your Wi-Fi firmware, please be sure to see the post on my community page about checking your firmware version and the parts you will need. I'll have the video out as soon as I can. Thanks again! DD
@Lu523523
@Lu523523 Ай бұрын
Thanks for the helpful videos. Did you do a part about adding more information?
@DriverDTrains
@DriverDTrains Ай бұрын
Thank you for your kind comments. I'm glad you are finding the videos helpful. There are two ways to display additional information on the LCD display. The easiest is by using the DCC-EX automation component, EX-Rail. I created a short last year where I showed how to display a holiday message on the LCD. kzbin.infoqcolfAYsYNk More recently, I am currently completing a series of videos on using DCC-EX, where we display some information on the LCD as part of our automations. The other method for displaying additional information on the LCD involves editing the DCC-EX code. After I complete the EX-Rail series, I will be making a video about adding a second (or third) LDC to the DCC-EX command station, and then use one of the examples that DCC-EX provides to display information on that second LCD about our active locomotives. I will also share some of the edits I have made to DCC-EX to display additional information on the LCD. That video (or videos) will come out in the new year. Thanks again and happy railroading! DD
@saxhorn1508
@saxhorn1508 Жыл бұрын
Great series - keep them rolling.
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you so much for your kind comments. I'm glad you're enjoying the videos. I hope to have the next one done shortly. Thanks again! DD
@donaldkormos5529
@donaldkormos5529 10 ай бұрын
My eyes aren't great either!! You might try a 2.42 inch 128x64 OLED screen (white). Available online for $10 to $15. Displays 8 lines of bright white text on black background. Have three of them on a DCC-EX command stations for different layouts. Other colors available, but I prefer white. All the best ...
@DriverDTrains
@DriverDTrains 10 ай бұрын
Thanks for the pointers! I somehow missed that there is a 2.42 inch version of the OLED; I have the 1.3 version. I ordered one to check it out. I'll post a video on all the options at some point in the future. Thanks again! DD
@grahampartridge9335
@grahampartridge9335 Жыл бұрын
Hi. Thanks for the video's on dcc ex
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments. I'm glad you are enjoying the videos! Thanks again, DD
@donaldkormos5529
@donaldkormos5529 10 ай бұрын
The OLED display option is also nice option ... it's smaller, but displays more lines of text and it's easier to read in my opinion.
@DriverDTrains
@DriverDTrains 10 ай бұрын
Thank you for your kind comments and suggestions. I have a couple of OLED panels I need to hook up and try out. My eyesight isn't the best anymore so I am curious so see whether the OLEDs are too small; I wonder if I can find some kind of magnifying plastic case to put them in. I also have a second LCD display configured for my DCC-EX command station; I need to make a video about that sometime as well. Thanks again and enjoy! DD
@donaldkormos5529
@donaldkormos5529 10 ай бұрын
@@DriverDTrains My eyesight isn't great either!! Look into the 2.42 inch 128x64 1306 OLED (white) ... available online for about $10. You get 8 lines of very bright white text displayed all at once on black background. Have three of them on three DCC-EX command stations for different layouts. Al the best ...
@dantecant
@dantecant 7 ай бұрын
I have two DCC-EX setups. One uses Arduino Motor Shield REV3 while the second one uses the Markerfabs and all use the ESP8266 WiFi shield and 20 x4 display. They work fine accept the display for Markerfabs doesn’t work, it lights up but I get no message. Both displays work’s fine when hooked to the Arduino Motor Shield REV3.
@dantecant
@dantecant 7 ай бұрын
Sorry, I should have said EX-MotorShield8874 RevA not Markerfab. The real question is how do I hookup the EX-MotorShield8874 RevA and the LCD 20 x4 display? Both displays work’s fine when hooked to the Arduino Motor Shield REV3.
@DriverDTrains
@DriverDTrains 7 ай бұрын
Thank you for your kind comments. Sorry about the delay getting back to you. There are two things you need to check; the hardware (i.e. the wiring), and the software (the EX-Command station sketch in the Arduino IDE). [If you used the EX-Installer you may need to reach out to the folks at DCC-EX for help.] I suggest you start with the software first. I don't know if you are using the same sketch for both motor shields and just changing the motor shield definition each time you upload it, or if you have two separate sketches. Either way, make sure that the sketch you are using with the EX-MotorShield has the proper configuration settings for the LCD, including that it is enabled, as well as its dimensions and I2C address. For the hardware, if you are connecting your jumper wires to the pins on the top of the EX-MotorShield, be sure to note what order they are in; it is different than the standard Rev3 motor shield. Also, according to the technical specs (below), the power on the pins on top of the EX-MotorShield is 3.3v, versus 5v on the Rev3. Some LCD screens will work fine with both 3.3 and 5v, but others may not. github.com/DCC-EX/EX-Hardware/blob/main/EX-Motorshield8874/README.md *** NOTE STEMMA QT power is tied to 3v3 as that is required for the standard. When using the EX-MotorShield8874 with 5V motherboards such as UNO and Mega, any I2C peripherals connected to the STEMMA QT connector must be 5V-tolerant only! *** Pull-up resistors for the I2C communication are not populated by default. If required, pull-up resistors (R101, R102) can be populated on the board, though this is typically not necessary. The easiest way to deal with this is to go directly to the I2C SDA and SCL lines on the Arduino controller board instead of the ones on the motor shield, and then get 5v and ground from the header socket on the side of the board. See this picture for the Arduino Mega (if you are using an Uno it's more problematic as there is some overlap for the I2C lines): europe1.discourse-cdn.com/arduino/original/4X/5/3/b/53bccd0f6064b1fb2172ed0ec9da08c245c93a7d.png Anyway, hope this helps. Good luck and let me know what happens. Thanks again! DD
@russ4723
@russ4723 Жыл бұрын
Wow...fantastic series of tutorials. I have got 99% of the DCC-EX up and running, but i cant seem to bring the wifi ESP01 online, as i don't know how to flash it to the compatible version :(
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments. Sorry to hear you are having trouble with the ESP-01. I don't have any experience with that module as I am using the Makerfabs Wi-Fi shield which has the ESP-12 module on it. They are both ESP8266 chips, but the packaging is different. My video on how to flash that with new firmware will be out soon. Maybe it will give you some helpful ideas. Thanks again! DD
@pwilliamssa
@pwilliamssa Жыл бұрын
Who say's model railroading has to be expensive? My layout is powered by an old PC power supply. Gives me 12v, which I step up to 14v for my DCC EX, and 12v, 5v and 3.3 v for all my accessories, all via DCC connected Arduino boards. (Check out the Model Electronic Railway Group - MERG). Great tutorial. Looking forwarg to JMRI integration as that's where I'm at on my railway. What is that hand held throttle you're using?
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you very much for your kind comments. I hope to start working on some JMRI videos shortly; mostly starting with DecoderPro and JMRI Throttles. So you noticed that little device I was using as a throttle? Not sure if anyone would pick up on that. One of the nice things about JMRI throttles is that when you run JMRI on your computer you can use almost any input device including your mouse, keyboard, and quite a few other things as a throttle. What you saw at the end of the video is a drawing tablet controller, that also doubles as an application keyboard shortcut device, called a Xencelabs Quick Keys. It is customizable with 8 buttons, a dial, and an OLED display, each of which can have multiple settings that you can cycle through. I really need to learn how to use it more. It does have a few limitations. It requires that you run JMRI on a computer (Mac or Windows) and does not support Raspberry Pi. It requires that you use an included USB dongle for 2.4ghz wireless connection as it's not bluetooth. The dial does not have any stops or detents; it just spins. And it does not display any information received back from JMRI, such as set locomotive ID, speed, functions, etc. But I find it quite handy as a handheld controller. It's not super cheap, but it costs less than a DCC throttle. I paid $80 for it on Amazon. Here is the link. www.amazon.com/dp/B08VNCLDTK Thanks again for your comments! DD
@BriansModelTrains
@BriansModelTrains Жыл бұрын
@@DriverDTrains Thnaks for the info on the throttle. That looks pretty neat.
@bendunselman
@bendunselman Жыл бұрын
Nice video. Question: is the I2C address of the LCD always 0x27? Or would I need to change it dependent on the manufacturer of the LCD?
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments! Good question. My understanding is that most of the LCD displays on the market use the 0x27 address, so that seems to be the common assumption. I have read a few different places that if the address is *not* 0x27 then it is probably 0x3F. If you're interested, I found this Arduino code for an I2C Address Scanner online at arduinogetstarted.com which you can use to verify the I2C addresses of any devices connected to the Arduino. I tested it and it works (at least for the one LCD display I tested it with). Thanks again! DD // I2C address scanner program from arduinogetstarted.com #include void setup() { Wire.begin(); Serial.begin(9600); Serial.println("I2C Scanner"); } void loop() { byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address < 16) Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; } else if (error==4) { Serial.print("Unknown error at address 0x"); if (address < 16) Serial.print("0"); Serial.println(address,HEX); } } if (nDevices == 0) Serial.println("No I2C devices found"); else Serial.println("done"); delay(5000); // wait 5 seconds for next scan }
@TheRowanhouse
@TheRowanhouse Жыл бұрын
I have added an LCD display and changed the info displayed from the default but would like to customise the screen to show more dynamic info. However I cannot find any info on how to do this. I have watched and enjoyed this series of videos and I think you mentioned such customisation in one of them. Will you be producing such a video or do you know of a source of relevant guidance?
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments! I'm glad you're enjoying the videos. Yes I will be making a video about how to add some additional customizations and dynamic text to the LCD display. No, I have not seen much information about it online either. The only source of information I have found is the DCC-EX Discord server, but that takes a bit of effort to get what you're looking for (you may get three different answers to your question before you get the one you wanted). For starters, you can send text to the LCD display pretty easily in your automations using the EX-Rail LCD command. This is an easy way to report the status of switch turnouts, which routes are set, etc. While you can script the text to change throughout the automation, it's not really dynamic in the way that I think of it. As an example, I wanted to intercept the DCC commands sent to my locomotives to report their speed on the display. That particular activity happens in the CommandDistributor.cpp sketch, so I added some code to the "broadcastLoco" function in that sketch to report the road number (DCC Address) and speed. You can also obtain which DCC functions are active from the same function. This is what that looks like... This is the existing code that sends the DCC commands (speed & functions) to the loco: void CommandDistributor::broadcastLoco(byte slot) { DCC::LOCO * sp=&DCC::speedTable[slot]; broadcastReply(COMMAND_TYPE, F(" "), sp->loco,slot,sp->speedCode,sp->functions); Just after the broadcast to the loco I added the following to send the loco ID and speed to the display: // Updated 11-08-2023 // @DriverDTrains code to display most recent active loco & speed in LCD; // Have to convert speeds 2-127 to -1 to -126; 130-255 to 1-126; 128 & 129 to 0 // LCD (0, F(""), sp->loco,slot,sp->speedCode,sp->functions); if (sp->speedCode==0 || sp->speedCode==128 || sp->speedCode==129) { LCD (3, F("Loco: %d Spd: 0"), sp->loco); } else if (sp->speedCode>129) { LCD (3, F("Loco: %d Spd: %d"), sp->loco,sp->speedCode-129); } else { LCD (3, F("Loco: %d Spd: %d"), sp->loco,1-sp->speedCode); } The rest of the broadcast function remains unchanged. I just inserted my bits. This is a pretty basic example. It just prints out the values of variables that are already in the code (with a little math to show the speed the way it appears on the throttle). Also, it only displays the values for one locomotive; whichever was the last to receive a new command. I eventually plan to add some additional code to store values for multiple locomotives that can all be displayed at once. Anyway, hope this helps and gives you some ideas. Thanks again! DD
@TheRowanhouse
@TheRowanhouse Жыл бұрын
Thanks for the info. I added those lines to CommandDistributor.cpp, compiled and uploaded the code and am happy to report that it works just fine. I look forward to your future videos. Alan
@billhendrickson1831
@billhendrickson1831 Жыл бұрын
Hi and great videos!!! Where did you find the commands for changing the LCD display messages...I looked all over the dcc ex website and documents but the info for the display is rather limited....I looked on Discord too but that is a confusing website for sure!!! Lol Thanks Bill
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comments! I'm glad you're enjoying the videos. I have not seen much information about online customizing the LCD display either. Discord definitely takes a bit of effort to navigate to get what you're looking for (you may get three different answers to your question before you get the one you wanted). I do plan on making a video about how to add some additional customizations and dynamic text to the LCD display. For now I will repeat most of what I said in response to another comment. For starters, you can send text to the LCD display pretty easily in your automations using the EX-Rail LCD command. (I just published one example in a video short on my channel.) This is an easy way to report the status of switch turnouts, which routes are set, etc. While you can script the text to change throughout the automation, it's not really dynamic (it does not update by itself). For example, I wanted to intercept the DCC commands sent to my locomotives to report their speed on the display. That particular activity happens in the CommandDistributor.cpp sketch, so I added some code to the "broadcastLoco" function in that sketch to report the road number (DCC Address) and speed. You can also obtain which DCC functions are active from the same function. This is what that looks like... This is the existing code that sends the DCC commands (speed & functions) to the loco: void CommandDistributor::broadcastLoco(byte slot) { DCC::LOCO * sp=&DCC::speedTable[slot]; broadcastReply(COMMAND_TYPE, F(" "), sp->loco,slot,sp->speedCode,sp->functions); Just after the broadcast to the loco I added the following to send the loco ID and speed to the display: // Updated 11-08-2023 // @DriverDTrains code to display most recent active loco & speed in LCD; // Have to convert speeds 2-127 to -1 to -126; 130-255 to 1-126; 128 & 129 to 0 // LCD (0, F(""), sp->loco,slot,sp->speedCode,sp->functions); if (sp->speedCode==0 || sp->speedCode==128 || sp->speedCode==129) { LCD (3, F("Loco: %d Spd: 0"), sp->loco); } else if (sp->speedCode>129) { LCD (3, F("Loco: %d Spd: %d"), sp->loco,sp->speedCode-129); } else { LCD (3, F("Loco: %d Spd: %d"), sp->loco,1-sp->speedCode); } The rest of the broadcast function remains unchanged. I just inserted my bits. This is a pretty basic example. It just prints out the values of variables that are already in the code (with a little math to show the speed the way it appears on the throttle). Also, it only displays the values for one locomotive; whichever was the last to receive a new command. I eventually plan to add some additional code to store values for multiple locomotives that can all be displayed at once. Anyway, hope this helps give you some ideas. Like I said, I plan to go over some more of this in a future video. Thanks again! DD
@billhendrickson1831
@billhendrickson1831 Жыл бұрын
@@DriverDTrains Thanks DD...that's a pretty comprehensive answer to my question!!!..Lol...I and a newbie to this "code" stuff and just built the DCC EX arduino setup and also built a USB volume control with the Adafruit Trinket connected to my android phone...works well but what a pain to get the code uploaded to the Trinket....had to go to several different websites to find all the info...maybe I will put it all in one place to make it easier for someone else....lol...I hope I remember what I even did??? anyway, going to play around with the script you wrote and see what happens...half the fun for me is experimenting with the electronics...thanks again and look forward to more videos!
@mikemike-xw6rs
@mikemike-xw6rs Ай бұрын
in this video, you mention, that in a later video, you would explain how to get the loco ID and speed on the display. I can't find this video. where can I find this information?
@DriverDTrains
@DriverDTrains Ай бұрын
Thank you for your kind comments. I hope you are finding the videos helpful. I have not yet had a chance to make the video showing how to display the loco ID and speed on the display, but will explain it here and provide the code you need. I will also provide some additional information on ways to display information on the LCD. And as I mention below, I have a video coming up where I will explain how to display additional locomotive information on a second (or third) LCD display. Ok, here is what you need to do to display the loco ID and speed on your LCD. You will be editing the EX-CommandStation sketch in the Arduino IDE, and then upload the edited sketch to your Arduino DCC-EX Command Station. 1. The file you will be editing is the CommandDistributor.cpp sketch. Start by making a backup copy of this file in case you run into any problems. 2. Open DCC-EX (the CommandStation-EX.ino file) in the Arduino IDE. Navigate to the CommandDistributor.cpp tab. It should be one of the first ones. 3. Scroll down to near the bottom to find the line that says #ifdef SABERTOOTH. It is line 208 in the current production version 5.0.7. Add some blank lines just BEFORE that line so you can see what you're doing next. 4. Just BEFORE the #ifdef SABERTOOTH line (i.e. between the line that starts with broadcastReply and the #ifdef line) add the following code: // @DriverDTrains code to display most recent active loco & speed in LCD 11-08-2023 // Have to convert speeds 2-127 to -1 to -126; 130-255 to 1-126; 128 & 129 to 0 // if (sp->speedCode==0 || sp->speedCode==128 || sp->speedCode==129) { LCD (3, F("Loco: %d Spd: 0"), sp->loco); } else if (sp->speedCode>129) { LCD (3, F("Loco: %d Spd: %d"), sp->loco,sp->speedCode-129); } else { LCD (3, F("Loco: %d Spd: %d"), sp->loco,1-sp->speedCode); } // end loco display routine 5. That's it! Note that I have chosen to display the information on line 3 (of 0-7) of the LCD, which is the bottom line of the first page of the LCD display. You can choose another line if you like by changing the 3s to another number from 0 to 7 in the above code; for example line 4 would be the top of the second page. Now for some additional information. Generally speaking , there are two ways to display information on the LCD display. The easiest is by using the DCC-EX automation component, EX-Rail. I created a short last year where I showed how to display a holiday message on the LCD. kzbin.infoqcolfAYsYNk You can also look at the current series of videos I am working on explaining how to use EX-Rail. My next video will be out this week, and the last part of that series should be out after the new year. The other method for displaying additional information on the LCD involves editing the DCC-EX code similar to what I did above. After I complete the EX-Rail series, I will be making a video about adding a second (or third) LDC to the DCC-EX command station, and then use one of the examples that DCC-EX provides to display information on that second LCD about our active locomotives. I will also share some more of the edits I have made to DCC-EX to display additional information on the LCD. That video (or videos) will come out in the new year. Thanks again and happy railroading! DD
@mikemike-xw6rs
@mikemike-xw6rs Ай бұрын
​@@DriverDTrains Thank you 0:02 very much, I received a 4x20 lcd display. Tried it, and can confirm: it works! information anywhere else! You're the Boss!
@DriverDTrains
@DriverDTrains Ай бұрын
@@mikemike-xw6rs So glad to hear it! Happy new year! And happy railroading! DD
@skeeterweazel
@skeeterweazel Жыл бұрын
We wanna see turnout control!😁
@DriverDTrains
@DriverDTrains Жыл бұрын
Thank you for your kind comment! I would like to see some turnout control too! : ) I hope to get to that eventually. Right now I am trying to shut down a video on the Wi-Fi firmware, then have a few other assorted topics to hit before I do an intro to JMRI. Thanks again! DD
#4.d - Configuring DCC-EX Wi-Fi   @DriverDTrains
32:35
DriverDTrains
Рет қаралды 5 М.
Demonstration of Ex-IOExpander for use with DCC-EX CommandStation
5:34
Model Railroading with Bill Masters
Рет қаралды 1,5 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
DCC-EX CSB1 5 Amp Command Station Review - is it really plug and play?
27:25
Wirenwood Model Railway
Рет қаралды 6 М.
0047 Decoding DCC from scratch
18:50
Endoor: N Gauge Railway
Рет қаралды 17 М.
Is there FINALLY an affordable DCC System with a lot of power?
5:55
DIY and Digital Railroad
Рет қаралды 53 М.
Model Railway Automation using EXRAIL from DCC-EX
15:50
Little Wicket Railway
Рет қаралды 10 М.
#4.a - Assembling a DCC EX Command Station   @DriverDTrains
20:47
DriverDTrains
Рет қаралды 19 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,4 МЛН
The BEST Mechanical Display You've EVER Seen!!
13:51
Tin Foil Hat
Рет қаралды 623 М.
I Made The Ultimate Cheating Device
9:39
ChromaLock
Рет қаралды 1,9 МЛН
Before You Buy A New DCC System In 2024/25, Watch This Video!
13:28
Model Railroad Techniques
Рет қаралды 3,7 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН