You can do RGB lighting? You using the Proc system?
You're currently viewing posts by Pinsider captainneo.
Click here to go back to viewing the entire thread.
Quoted from Mocean:Sure. My code is derived from Mark S (Snux)'s Arduino code for his F-14 second Sortie. My interface cleans up the pyprocgame integration so that you define a wsRGBs section in your machine yaml file and the parser pulls out the Arduino number and the default color (similar to marks)
Under the covers, I changed things so the wsRGBs get treated as real first-class objects in the pyprocgame code, and these objects work just like lamps (and actually get added to the lamps array), but also have two very cool methods: set_color(letter) --where the letter is a short hand for one of handful of colors (eg, W for white or M for magenta), or set_color_rgb, which sets a 64 bit color (2 bits red, 2bigs green, 2bits blue).
These rgb lamps, when present, otherwise behave exactly as regular pyprocgame lamps do. They can be enabled, disabled, or scheduled. On the pyprocgame/Python code side I wrote a threaded client to do the usb sending of commands, so there's virtually no impact on game loop rates.
The difference is that when their instructions are encountered, the messages are sent via usb to a Teensy 3.1 with an OctoWs2811 "add on" running custom code that decodes the lamp index, 64bit color, and schedule, and updates the lamps.
The teensy is amazing for this task as it can run the ws281x leds via DMA (Direct Memory Access), so the teensy's cpu is totally free to deal with usb messages and color decoding.
I'm happy to share the code for all of this. Most of it has already been shared, but I haven't shared my 64bit color stuff with anyone (other than another project). If you want the code or more details just fire off a PM.
It sounds more complicated than it is, really.
You can read the whole crazy process to improve this code and the capabilities in this thread, here:
http://www.pinballcontrollers.com/forum/index.php?topic=1239.msg13518#msg13518
I have no idea what the hell you just said right now. How about I just pay you to come program my game when it's ready.
Quoted from Mocean:If I don't need to come there, and you want to buy me a P^3, we can talk.
If there is a P3 in my house, it's not going anywhere.
You're currently viewing posts by Pinsider captainneo.
Click here to go back to viewing the entire thread.
Wanna join the discussion? Please sign in to reply to this topic.
Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!
This page was printed from https://pinside.com/pinball/forum/topic/buffy-the-vampire-slayer-pinball?tu=captainneo and we tried optimising it for printing. Some page elements may have been deliberately hidden.
Scan the QR code on the left to jump to the URL this document was printed from.