Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

I need help with the Arduino software

6788 views
31 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
I need help with the Arduino software
Posted by hon30critter on Tuesday, March 24, 2020 3:50 AM

Hi guys,

I have decided to take the plunge into Arduino technology. I have purchased the basic Arduino kit offered by Dr. Duino and I assembled it last night. My problem is that I can't open the testing and programming software. I have the software loaded on to my computer, but when I try to open the program I'm getting a message asking me to find the necessary software needed to open the Dr. Duino program. When I do that, I get a message that the system is not able to process my request. Has anybody else experienced this problem?

I'm going to send a message to the Dr. Duino people asking for help, but I thought I would also ask the question on the forums.

Thanks,

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Tuesday, March 24, 2020 5:34 AM

looks like a Dr Duino is similar to the Radio Shack 100 in 1 Project Kits.  This Dr Duino page says it provides example programs.

Ultimately you need the Arduino Interactive Development Environment (IDE) that provides a windows application for writing, compiling and downloading code.

but instead of writing programs that do specific things like toggle digital outputs to turn on/off LEDs  or read button switches, a single program, PcRead.ino, will save time to learn what the Arduino functions do.  It uses the IDE's serial monitor to enter commands that exercise many of the Arduino's I/O capabilities and display input values

once you're familiar with the Arduino functions, you can develop you own applications or add new commands to pcRead 

greg - Philadelphia & Reading / Reading

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Tuesday, March 24, 2020 6:09 AM

hon30critter

I have decided to take the plunge into Arduino technology. 

Why?  Why bother? What is it that you are trying to accomplish?

I spent the early part of my career as a computer programmer and later on used my programming skills as a financial planner. Coding is a skill that takes time to develop, debug, and perfect.

I will admit that I know little about Arduino, so I will be anxious to see how this thread develops.

Rich

Alton Junction

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, March 24, 2020 7:29 AM

I agree with Greg, take the free Arduino IDE download an go from there.  Randy and Greg are the Arduino go to guys.
 
I started out with a $49 Arduino starter kit and sometimes confusing but if my 80+ year old brain can do it anyone can.  At least half of my brain cells have gone to sleep and can’t wake up.
 
 
 
Mel
 
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Tuesday, March 24, 2020 7:36 AM

Mel, what kinds of applications have you used Arduino for?

Rich

Alton Junction

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, March 24, 2020 7:43 AM

 The main purpose of those starter kits is to get you some components and modules to get started. The Arduino IDE is what you want. It comes with examples programs ('sketches') for various features. The documentation for all those, including the wiring diagrams, are here:

https://www.arduino.cc/en/Tutorial/BuiltInExamples

but the kit I got included it all printed out in a little book. There's a lot on the Arduino site under the Getting Started and Tutorials sections.

                                      --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, March 24, 2020 9:17 AM

richhotrain

Mel, what kinds of applications have you used Arduino for?

Rich

 

So far I have a working three color signaling system in and working from an Arduino MEGA and 8 UNO random lighting controllers each driving 20 GoW bulbs in 8 scratch built houses.
 
 
 
 
I use the UNOs for gate controllers for my crossings.  One UNO does a pair of gate controllers and a Wig-Wag.
 
I also use the NANOs programmed for multitasking for flashing LEDs and Bulbs, each one has 7 outputs for non synced flashing.  I use them for vehicle flashing lights and aviation warning lights on water tanks and communications towers.
 
This is a link to a couple of videos.
 
I’m currently working on a servo driver for turnouts and opening and closing doors.
 
I’m a gadget guy and really get into automated goodies.
 
I’m also into incandescent bulbs on my layout for a more realistic look of the 50s and because the bulbs draw more current than an Arduino can handle I use an expansion board on the Arduinos for high current driver chips.  Each output from my lighting controllers is capable of 500ma at 8½ volts.
 
 
 
 
 
I run my incandescent bulbs at 70% for longer life as well as they are much more realistic looking at lower voltage.  I currently have roughly 250 12 volt bulbs on my layout.  I can’t ever remember having to replace any in over 20 years.
 
 
 
 
 
Mel
 
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    April 2019
  • From: Pacific Northwest
  • 780 posts
Posted by SPSOT fan on Tuesday, March 24, 2020 12:12 PM

I'm currently working on learning how work with an Arduino and learn a little bit of C++, and here are a few things I have found helpful:

-First the Arduino website (https://www.arduino.cc/) can be quite useful. An expsially useful part I have found is the search bar in the top right. I use it often when I find a command in an example code I don't understand, as it will pop up pages explaining all the commands. (As an example here is the page for the digitalWrite() command: https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/)

-Second it can be helpful to mockup things virtually, so websites like TinkerCAD (https://www.tinkercad.com/dashboard) can make it easy to test things out without dealing with the actual Arduino. The Arduino stuff in TinkerCAD is found in the circuits section. This is especially helpful for me as I have yet to buy my own Arduino.

Also about the Arduino IDE it is definitely something you'll need to download, I don't know how you could avoid it!

I hope you enjoy working with the Arduino! It has a lot of applications in model railroading! I'm currently using it to design a model railroad signal system as a part of school project, and it is really enjoyable!

Regards, Isaac

I model my railroad and you model yours! I model my way and you model yours!

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, March 24, 2020 1:25 PM

 Welll... there are other ways besides the Arduino IDE to program the boards - there is a plugin for Notepad++, there is an add on for Microsoft Visual Studio, and there is always Atmel Studio, from the maker of the various microcontrollers that are often found on various Arduino boards. Which is really just a stripped down version of Visual Studio.

 The Arduino IDE is plenty good to get started with though. I just lacks some things that fancier tools have, like version control, but for a solo experimenter, you don't really need anything more fancy than keeping copies by using changing file names or extra folders. There's no need to worry about configuration with the official IDE, it more or less just works when you install it.

                                                 --Randy


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Tuesday, March 24, 2020 10:36 PM

richhotrain
Why?  Why bother? What is it that you are trying to accomplish?

Hi Rich,

The simple goal is to be able to use the Arduino modules to perform various tasks on my new layout from things like controlling simple structure lighting and traffic lights to more complex signal and crossing light control.

The other motivator is to learn something new. I am retired. I have precious little going on in my life besides model railroading and my family life. I have dropped out of the train club for reasons I won't repeat, so to answer your question directly, why not?

Cheers!!

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Tuesday, March 24, 2020 10:52 PM

Okay, I have the Arduino software loaded onto my computer. The first step is to test the Arduino module that I have just assembled. Unfortunately the module won't accept the test software upload. The Arduino Help section suggests a rather large variety of possible problems so I have been trying to work through those, so far with no success. I have quit for the night because I am a bit frustrated, but I will try again tomorrow.

Patience, patience, patience!!!

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Wednesday, March 25, 2020 4:03 AM

hon30critter
  
richhotrain
Why?  Why bother? What is it that you are trying to accomplish? 

Hi Rich,

The simple goal is to be able to use the Arduino modules to perform various tasks on my new layout from things like controlling simple structure lighting and traffic lights to more complex signal and crossing light control.

The other motivator is to learn something new. I am retired. I have precious little going on in my life besides model railroading and my family life. I have dropped out of the train club for reasons I won't repeat, so to answer your question directly, why not?

Cheers!!

Dave 

Until this thread started, I knew nothing about Arduino, so Mel's reply to my question was helpful.

Apparently, Arduino is most useful to model railroaders for lighting applications and animation effects.

Good luck!

Rich

Alton Junction

  • Member since
    December 2015
  • From: Shenandoah Valley
  • 9,094 posts
Posted by BigDaddy on Wednesday, March 25, 2020 4:21 AM

I got a kit a while ago, but for some reason I am reluctant to learn another programming language.  Did Fortran in college and some basic when PC's came out but no longer have interest in it.

Gerry Leone did a video on MRVP where he had buildings with lights going on and off randomly and signs where the lights go on and off sequentially around the edge of the sign.  You need to have a subsciption to see this

Henry

COB Potomac & Northern

Shenandoah Valley

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Wednesday, March 25, 2020 5:03 AM

BigDaddy

I got a kit a while ago, but for some reason I am reluctant to learn another programming language.  Did Fortran in college and some basic when PC's came out but no longer have interest in it.

Same here. I programmed IBM computers (1401 and System 360) back in the 60s using Autocoder mainly. Eventually started programming in Basic, then finally Visual Basic. That's enough coding for me.

Rich

Alton Junction

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Wednesday, March 25, 2020 6:57 AM

richhotrain
Apparently, Arduino is most useful to model railroaders for lighting applications and animation effects.

much much more than that.

The Atmel processor used on an Arduino boad has many built in peripherals including I/O, serial USART, ADC, EEPROM that make it a microcontroller rather than simply a microprocessor.  It has 32k of Flash memory for program, 2k of RAM and 1k of EEPROM.

Arduinos are well suited as Bruce Chubbs C/MRI nodes that allow a network of nodes to communincate with a PC to monitor block occupancy and turnout positions and control turnouts and signal, among other things.  C/MRI is supported by JMRI.   Not only does this allow more sophisticated control, but saves wiring (and sanity)

i've used Arduinos for turntable indexing and an NCE compatible cab.

programs can be written in C/C++ rather than assembler.   Unlike higher level languages and Basic, C allows direct access to memory mapped I/O and RAM.

An Arduino can be re-programmed within a few seconds using a simple USB cable (an Arduino board has a separate USB interface chip)

The Arduino IDE Serial monitor displays prints and the monitor allows ascii string commands to be sent to the Arduino.    This allows an arduino to be used as a physical interface while using a laptop for control

 

it's just a heck of a lot easier than writing in assembler, programming EEROMs or dealing with processor specific in-circuit-programmers.

It allows control of physical devices rather than just doing inventory or spreadsheet type of stuff.

greg - Philadelphia & Reading / Reading

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Wednesday, March 25, 2020 7:39 AM

No doubt about it, greg, C++ is a powerful programming language, but like all programming languages, it comes with a steep learning curve. After I retired, I continued to program in Visual Basic for awhile to provide client analysis. But when it comes to model railroading, I view it as a total escape from the real world, so from that perspective I have no interest in Arduino. Even programming the NCE Mini Panel struck me as tedious.

Rich

Alton Junction

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, March 25, 2020 7:47 AM

 Two keys with getting the Arduino IDE to be able to upload to your board. First, you need the right COM port. With no Arduino connected to your computer, whatever COM port it shows, if any, is NOT the right one. When you plug the Arduino's USB cable in, a new COM port should appear. That will be your board. Some knockoff Arduino boards use a different USB chip that supposedly requires a driver to be installed that is not included with Windows - but on 3 different computers I never had to install anything besides the IDE (and some other stuff for advanced things which you don't need to even think about right now).

Second, the proper board must be selected under Tools, Boards. If you have a board that is supposed to be just like the Uno, select Arduino Uno, etc. If what I'm seeing on the Dr. Duino site is what you have, it's supposed to be an Uno. 

Also- start with the basics - use the Arduino (the one pictured on the site is a blue PCB) disconnected from that red board with all the extra connections. 

                              --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Wednesday, March 25, 2020 8:00 AM

richhotrain
C++ is a powerful programming language, but like all programming languages, it comes with a steep learning curve.

I worked on one of the first data terminals to use C.  The supervisor said most of the developers were writing assembly code in C.    Today, most code is still simple C.   C++ compilers do more type checking as well as add object oriented constructs and many other other non-OO features.   

Bjarne Stroustrup said he felt it takes 10 years to really understand how to use C++ proficiently.

Fortunately, C is a relatively simple language and all you really need to program an Arduino.

greg - Philadelphia & Reading / Reading

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Wednesday, March 25, 2020 8:10 AM

gregc
 
richhotrain
C++ is a powerful programming language, but like all programming languages, it comes with a steep learning curve. 

Bjarne Stroustrup said he felt it takes 10 years to really understand how to use C++ proficiently.

I was reading an interview with Stroustrup. When asked if he is working on the development of a new programming language, he responded No, he is still learning how to use Standard C++.

LOL. That from the original developer of C++.

Rich

Alton Junction

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Wednesday, March 25, 2020 7:23 PM

richhotrain
I was reading an interview with Stroustrup. When asked if he is working on the development of a new programming language, he responded No, he is still learning how to use Standard C++. LOL. That from the original developer of C++.

Well that's encouraging!

Seriously, I haven't tried to get the Arduino Uno programmed again but I will give it another try soon. Hopefully your answers have provided a solution. I am pretty stubborn about figuring these things out. It may take me many hours to solve a problem, but so far at least I have been able to figure things out and I have not thrown the computer at the wall even once!Smile, Wink & GrinLaughLaughLaugh

Cheers!!

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Monday, April 13, 2020 7:58 AM

hon30critter
o far at least I have been able to figure things out and I have not thrown the computer at the wall even once!

curious how you've made out  ... or has the arduino been thrown at the wall?

greg - Philadelphia & Reading / Reading

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Monday, April 13, 2020 8:51 AM

I did a quickie to checkout my scratch built diorama crossing signals.
 
 
I wanted to see what they look like in operation.  The SMT 1206 LEDs can be a bit too bright.  These are operating at 5 volts from a Arduino NANO.
 
 
 
Mel
 
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Tuesday, April 14, 2020 12:26 AM

gregc
curious how you've made out  ... or has the arduino been thrown at the wall? Add Quote to your Post

Hi Greg,

I was very tempted to throw the thing at the wall but I managed to contain myself. It is on the back burner for now but I will go back at it sometime soon. I have another Arduino starter kit somewhere so I think the first thing I will do is see if there is an Arduino board that I can substitute for the one I have been working with. Failing that, I will order another set of boards to see if that solves the problem.

I have looked at the first boards with my Optivisor and I can't see any stray bits of solder or fried traces so I don't know whether the boards are defective or if I'm not using the correct software. I have studied the help sections in detail but I have to confess that I don't understand a lot of the language or how to sort through the different programs.

Very frustrating.

In the interim I have multiple other projects to work on.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Tuesday, April 14, 2020 12:30 AM

RR_Mel
I did a quickie to checkout my scratch built diorama crossing signals.

I think they look good Mel! Dimming them a bit should be easy.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, April 14, 2020 7:56 AM

RR_Mel

I did a quickie to checkout my scratch built diorama crossing signals.
 
 
I wanted to see what they look like in operation.  The SMT 1206 LEDs can be a bit too bright.  These are operating at 5 volts from a Arduino NANO.
 
 
 
Mel
 
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 

 I'm tempted to use fade-out and fade-in routines to make them look like more period correct flashers for my 50's era setting. I wish there was an in-between size chip from the Tiny to the Mega, the Tiny doesn't have enough IO to do the flashers, servo to lower gates, and sensors to trigger it all, and a Mega is overkill (although I guess for the price, does it really matter?). Or I could make the detection/trigger with one Tiny, and the flasher unit itself with another Tiny.

                                          --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    February 2012
  • 1 posts
Posted by nnmagee on Thursday, April 23, 2020 1:53 PM

I have the same problem.  Plus...how do you find out actually using your Aduino, like railroad signals, lights. etc.  I have followed 3 different tutorials and no one tells you how to use the aduino in an application.  I am sick of programming..I would like to see some results

 

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, April 23, 2020 3:10 PM

nnmagee

I am sick of programming..I would like to see some results

 

 

I use the Arduinos for several things on my layout.
 
Arduino Tower Light:
 
Multiple flashing lights:
 
Arduino Crossing Gate with servos:
 
Arduino signal controller:
 
My Random Lighting Controller, I have 8 of these working on my layout:
 
The only limiting factor is your imagination.
 
 
 
Mel
 
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2010
  • 1 posts
Posted by 3ftroads on Thursday, April 23, 2020 3:19 PM

richhotrain

The C programming manual 228 pages; the C++ 11 programming manual is 1347 pages.  That's a good indication of the relative complexities of the two languages.  Fortunately, you don't have to use all of the features of C++ (but you need to understand classes to use Arduino.)

-Bob

 
gregc
 
richhotrain
C++ is a powerful programming language, but like all programming languages, it comes with a steep learning curve. 

Bjarne Stroustrup said he felt it takes 10 years to really understand how to use C++ proficiently.

 

 

I was reading an interview with Stroustrup. When asked if he is working on the development of a new programming language, he responded No, he is still learning how to use Standard C++.

 

LOL. That from the original developer of C++.

Rich

 

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Thursday, April 23, 2020 4:24 PM

nnmagee

I have the same problem.  Plus...how do you find out actually using your Aduino, like railroad signals, lights. etc.  I have followed 3 different tutorials and no one tells you how to use the aduino in an application.  I am sick of programming..I would like to see some results

 

 

 Interesting thought - one of the driving points of Arduino is that if you follow the examples, you start right off making something happen, like flash an LED. Which for some is used as a point of derision, as in it's such a simple thing that all it does is flash an LED.

                                    --Randy


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    September 2004
  • From: Dearborn Station
  • 24,281 posts
Posted by richhotrain on Thursday, April 23, 2020 4:47 PM

rrinker
 
nnmagee

I have the same problem.  Plus...how do you find out actually using your Aduino, like railroad signals, lights. etc.  I have followed 3 different tutorials and no one tells you how to use the aduino in an application.  I am sick of programming..I would like to see some results 

Interesting thought - one of the driving points of Arduino is that if you follow the examples, you start right off making something happen, like flash an LED. Which for some is used as a point of derision, as in it's such a simple thing that all it does is flash an LED.        

It does more? Smile, Wink & Grin

Rich

Alton Junction

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!