Turntable VI: Programming the Stack

Between random Saturday chores, I soldered the pins of the Adafruit Motor Shield. Prior to that, I had to squeeze the shield sideways for the Power light to signal. No big deal; just a bit more soldering than I expected.

From the DCC shield, I also pulled off the vestigial jumpers and those that would route power differently than needed. A few of the pulled jumpers were educated guesses, and (given the “educated” bit) I followed my brother-in-law’s lead.

The Arduino and both shields are now fully powered using either DC or USB. I had the option of powering it all from the DCC bus via the DCC shield, but I’m nervous about how much it would draw and possibly affect the performance of locomotives and switches. Thus, there will be two DC cables powering the layout.

My brother-in-law also had a great idea: I could add a USB extension that would lead to a panel on the front of the module, so I can simply plug my computer into that to program the turntable. In the future I may do that.

Anyhow, I loaded my brother-in-law’s sketch_turntable document into the Arduino library, so as far as I know the Arduino is now programmed.

Theoretically, choosing “Accessory 6” on the PowerCab should select the turntable; then pressing 1 or 2 will move it clockwise or counterclockwise 180 degrees. Choosing “Accessory 7” will also select it, but subsequently pressing 1 or 2 will only prompt it to move a single click.

We aren’t too optimistic about it working at this point, but I plan on wiring it up tomorrow to find out.

Edit: Once we have the code finalized, I will post it on this blog for safekeeping, and to share with others who may be interested.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s