This week I spent quite a bit of time trying to adjust some Arduino code that I wrote to get realistic flashes on some LEDs to simulate Police car flashing lights, Fire truck flashing lights and an ambulance’s lights. I think I mastered that quite well. I had planned to have these all installed by this weekend, but that never happened. I also re-wrote my disco flashing lights code and had them working well on my test bench. This is for my local Community Hall located at Fairy Hill. The next task is sound as well as lights - but that is a few weeks off. All these lights will be controlled by an Arduino. So I have the two pieces of code, the flashing lights for the emergency service vehicles, and the flashing light for the disco in a loco hall working separately. I now have to merge the two pieces of code into a single program in my Arduino. That will occur next weekend.
My weekend started on Friday afternoon when I installing a small shelf under Fairy Hill on the layout on which my Arduino (to control the all the lights) will be located. I should be able to provide power to the Arduino at that location easily enough. My plan is to have a switch on the fascia of the layout in various locations to turn the various scenes with flashing lights off. So separate switches for the police car, fire engine, ambulance and the disco. Instead of just having the Arduino keep running and going through the various parts of the program for each set of lights, and me just turn off the common wire in the circuit to those lights so they extinguish – and potentially make the program very simple, I went down a rabbit hole. And sitting back now, I have no idea why I did that. Those switches on the fascia are read by the Arduino and in that program running on the Arduino it just skips the particular flashing light code for whatever needs to be not run. Sitting here now, I just wonder why I decided to do that stupid technique. Oh Well!
Anyway, on Friday night and Saturday I started installing all the wiring for the local Community Hall disco so it would reach from the Arduino on the shelf to the Hall on the layout. But I was doing this on my work bench. When completed it would be taken out to the layout and installed. I would do a bit or work, test it. Do a bit more test it. Everything was going well. However, when I plugged the jumpers into this small section of PCB board they would not work. It just had to be bad contacts by the jumper pins in the PCB board holes. Too small a pin, or too large a hole and very bad contact was made. I wanted to not solder the last lot of jumpers for the 6 LEDs, from the PCB to inside the hall, so I could remove them from the layout easily if required. I decided to solder these connections as well. Then I also had trouble soldering to this old piece of PCB. It was very annoying. So I went out this morning and bought a new piece of PCB from Jaycar and used that. So this afternoon I created a new PCB, connected the wires and Perfect!
So the disco scene is now working very well. But the time ran out on the weekend. I might have watched the cricket on TV instead. So next weekend, I will update the two pieces of code (lights and disco) into a single program, and then lay the wires to the various emergency vehicles to flash the lights. I expect some issues with the wires going into the various vehicles, but will be next week’s problem.
Today I also watched about 85 minutes of trains running and commentary on Dave Abeles layout in the US from midday today - local time. There were at one stage 243 people from around the world watching these trains running. We even had our mate Marty from the Gold Coast running a few of these trains. A great day indeed.
No comments:
Post a Comment