Table 3: JMRI scripting for crane
##### Set Speed to Forward, stopped
self.throttle.speedSetting = 0.
self.throttle.setIsForward(True) self.waitMsec(
self.delay*400) ############## F8 on, forward”
self.throttle.setF8(True);
self.throttle.setIsForward(True) self.waitMsec(
self.delay*50)
############## F6 rear light on
self.throttle.setF6(True); self.waitMsec(
self.delay*500)
############## Mute (F8) off”
self.throttle.setF8(False);
self.throttle.setIsForward(True) self.waitMsec(
self.delay*1000)
########## Whistle
self.throttle.setF2(True); self.waitMsec(
self.delay*500)
self.throttle.setF2(False);
A Digitrax sound decoder is embedded in this model float plane (below). It controls the plane’s lights and the figure on the dock, who waves his hands and yells to the pilot (above). Small driver boards (bottom) can be used along with the Arduino for a variety of applications.
started using the Arduino in tandem with a small SN754410 H-Bridge driv- er to generate DCC commands (like a combination of DCC command station and throttle). This was greatly facili- tated with the freely available DCC li- brary, CmdrArduino, created by D.E. Goodman-Wilson and downloadable from
www.Railstars.com. A picture of some of the small driver boards is shown in the accompanying photo. While DCC control at this level is not for the faint of heart, sometimes re- quiring much trial and error, it is a tremendous capability to combine in- dependent DCC control and direct ani- mation timing control, and it opens up many new opportunities. In particular,
######### Crane Boom Up, 20%
self.throttle.speedSetting = 0.20
self.throttle.setIsForward(True)
self.throttle.setF3(True) self.waitMsec(
self.delay*4500)
self.throttle.setF3(False); self.waitMsec(
self.delay*1500)
######### Whistle
self.throttle.setF2(True); self.waitMsec(
self.delay*500) self.waitMsec(
self.delay*500)
########## Turn Cab CW, 11%”
self.throttle.speedSetting = 0.11
self.throttle.setIsForward(True)
self.throttle.setF1(True); self.waitMsec(
self.delay*4000)
self.throttle.setF1(False); self.waitMsec(
self.delay*2000)
########## Whistle
self.throttle.setF2(True); self.waitMsec(
self.delay*500)
the fuselage of a Lockheed Vega float- plane. Scripts can work DCC functions well, just like the example of the rail- way derrick above, but I had plans to in- clude action on the dock with the figure waving his hands and yelling at the pi- lot. This required millisecond timing with the d.c. motor control of the figure animation in synch with sounds. Dedicating laptops or personal com- puters to multiple specific animations would not be feasible. Ultimately,
I RAILROAD MODEL CRAFTSMAN 79
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44 |
Page 45 |
Page 46 |
Page 47 |
Page 48 |
Page 49 |
Page 50 |
Page 51 |
Page 52 |
Page 53 |
Page 54 |
Page 55 |
Page 56 |
Page 57 |
Page 58 |
Page 59 |
Page 60 |
Page 61 |
Page 62 |
Page 63 |
Page 64 |
Page 65 |
Page 66 |
Page 67 |
Page 68 |
Page 69 |
Page 70 |
Page 71 |
Page 72 |
Page 73 |
Page 74 |
Page 75 |
Page 76 |
Page 77 |
Page 78 |
Page 79 |
Page 80 |
Page 81 |
Page 82 |
Page 83 |
Page 84 |
Page 85 |
Page 86 |
Page 87 |
Page 88 |
Page 89 |
Page 90 |
Page 91 |
Page 92 |
Page 93 |
Page 94 |
Page 95 |
Page 96 |
Page 97 |
Page 98 |
Page 99 |
Page 100