Thursday, November 29, 2018

A Pin Best Servo'd Cold...

Woho, a proper update!

I've rewritten (or rather written) a servo library that piggybacks on the existing I/O loop. The good thing is that there's zero jitter and no "overflow" or "rollover" issues that is present in some libraries, and it seems to work pretty well. Although I had to guesstimate certain values, as the servos require a rather exact timing to function, it should be close enough for my purposes. I expect to trim and tune these parameters once everything is connected properly (like everything else) but it's nice to see the "last bastion" of remaining functions taken care of.

Furthermore, I've finalized solenoid, switch and light functions so they work properly and reliably with callbacks. I think I covered the switches in an older post, but the hits are buffered and executed in the order they were triggered and is put in the outside loop at ~40 Hz. 

For time critical events I've add high-prio callbacks that gets called right away in the inner loop (even before buffering the hit) that will be used by slingshots, flippers and bumpers, to ensure these solenoids gets triggered within the next microsecond. Sound, points and game related callbacks will run as usual in the outside I/O-loop. Hopefully this will, and should, make the game feel super snappy and responsive.

I've started the time consuming work of making the cables needed for connecting the new PCB-board to the pinball machine, and it's a few hundred meter cables that needs to be redone. Obviously I only do the ends of the cables, but still... ;)

So things are rolling once again, which is rather nice!


1) Doesn't exactly show the servos, but at least the colors are nice. ;) 

1 comment: