What's new
Pinball info

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Coding pinball mods

VeeMonroe

Site Supporter
Joined
Aug 4, 2021
Messages
2,844
Location
London
I’m looking to code my own mods and, from what I can see, the best system to do that with is Arduino.

Just wondered if anyone knew it that was the case before I shell out on a starter kit? I‘m going to try to get my larger lad interested over the summer break.

I’ve coded ‘professionally’ (well, it was during a PhD, but I had a grant :) ) and also have an AS level in electronics that I’ve completely forgotten.
 
I used a small Arduino (can't remember which offhand & can't check ATM cos I'm safe & sound in Rhodes) in my LW3 topper, mainly because a few years ago a contractor bought an Uno kit in for everyone in the office to try to get us into IoT. It's well overspec'd for the basic script it's running
 
Ditto. I've used Arduinos for some hacky things like wiring up Xbox controllers or Addams Family chairs (!) to the switch matrix.

You could use Arduino, Raspberry Pi, Esp32.. Whatever best suits
 
Arduino or esp32s (same code, just more powerful, built in Bluetooth an Wi-Fi etc). Buy a starter kit, they usually come with code tutorials.

https://randomnerdtutorials.com/ - is a great website with tons of examples for lots of different platforms.

if you want to control leds - then look at addressable LEDs such as ws2812B, WS2811 etc. There are some fabulous free libraries such as FastLed and WLED.

You can pick up signals from pinball controlled lamps easy enough - using cheap opto isolator boards. So it's pretty easy to trigger a mod to do something when a lamp lights .
Or speak to Davey @stumblor about the cool stuff he's done/doing digging deeper into the workings of a game.
 
Arduino or esp32s (same code, just more powerful, built in Bluetooth an Wi-Fi etc). Buy a starter kit, they usually come with code tutorials.

https://randomnerdtutorials.com/ - is a great website with tons of examples for lots of different platforms.

if you want to control leds - then look at addressable LEDs such as ws2812B, WS2811 etc. There are some fabulous free libraries such as FastLed and WLED.

You can pick up signals from pinball controlled lamps easy enough - using cheap opto isolator boards. So it's pretty easy to trigger a mod to do something when a lamp lights .
Or speak to Davey @stumblor about the cool stuff he's done/doing digging deeper into the workings of a game.
@stumblor's stopped making the CFTBL light/lollypop boards, so I was going to start by trying to make some pop bumper and LED chase lighting effects for our Creature.

Then, I was going to see if I could create a moving topper for Alien Poker (I need a 3D printer for that) and recode it with extra rules (nothing like ambition, huh?). I was also wondering if there was any way I could recode (and rewire) Alien Poker to run RGB lighting. It's going to take a while before I can do that, though, as I'm still transferring everything across to the new playfield.

I also need a non-rubbish topper for Godzilla and JP2. Again, I wanted to do an animatronic Godzilla/T-Rex. As I've already done a reproduction Fish Tales topper, I've got a basic idea of how much you can do with a few LEDs, a bit of wood and a solenoid.
 
well lucky for you (and me) we have Chat GPT now!

Been playing with it for the last few weeks and for coding its bloody awesome. Will do everything you need in terms of writing the Arduino code for triggering lights and solenoids etc.

Can build up pretty complex code. Have a look at it if you've not played around with chatGPT already, it blew me away tbh, makes it super quick and easy.

Even if you want to learn coding its great for that as well, clean code all explained and commented etc so its easy to follow what everything is doing.
 
Let us know how you get on! It;s something I've wanted to do for ages, just never had the time to commit to playing (FAR too many other things on the go!)
 
Though i have just checked out ChatGPT as suggested above, and as far as i can see As long as the question is clear then it'll write most of the code for you!!! :)
 
i know its brilliant.

tell it what you want it spits out the code. then all you do is build on it by telling to to "add xx function to above code". keep building until it does everything you want, monitor which pins, trigger outputs for a certain time, make a neopixel effect like fire or waves etc and it just spits all the code out :)

Then just ask it how to wire this all up using eg an optocoupler and will will tell you how to wire it all up, which resistors to use etc etc etc.

just awesome.

Imagine still being at school and having this to use for all your course work etc!!!

dosent bode well for actually getting a job at the end as lots of entry level roles will be going away and done by AI.
 
Let us know how you get on! It;s something I've wanted to do for ages, just never had the time to commit to playing (FAR too many other things on the go!)
Well, I don't have the time - I’ve got to fix some pins for a tournament and write an 8k short story! However, I have one day off work each week during the holidays when I have to find something to do with my sons, so Arduino coding seems a good way to get away from video games without going bankrupt paying for Lego! :)
tell it what you want it spits out the code. then all you do is build on it by telling to to "add xx function to above code". keep building until it does everything you want, monitor which pins, trigger outputs for a certain time, make a neopixel effect like fire or waves etc and it just spits all the code out :)

Then just ask it how to wire this all up using eg an optocoupler and will will tell you how to wire it all up, which resistors to use etc etc etc.

just awesome.

Imagine still being at school and having this to use for all your course work etc!!!

dosent bode well for actually getting a job at the end as lots of entry level roles will be going away and done by AI.
I’ve not been impressed by ChatGPT for writing (I can do it more accurately, more succinct and equally fast), but I’ve not tried it for coding yet. Will give it a go!
 
I like dabbling with the ardino/esp (I even found a plugin for VS that lets you add "virtual" breakpoints which helped a lot. But I have problems finding the time too. And I was using my laptop whilst sitting on the couch. Wires all over on the couch aint great. My extension is finally in progress though - which im hoping will make it easier to twiddle this stuff - because I wont need to pack it all away again when I stop fiddling for the day.
 
i know its brilliant.

tell it what you want it spits out the code. then all you do is build on it by telling to to "add xx function to above code". keep building until it does everything you want, monitor which pins, trigger outputs for a certain time, make a neopixel effect like fire or waves etc and it just spits all the code out :)

Then just ask it how to wire this all up using eg an optocoupler and will will tell you how to wire it all up, which resistors to use etc etc etc.

just awesome.

Imagine still being at school and having this to use for all your course work etc!!!

dosent bode well for actually getting a job at the end as lots of entry level roles will be going away and done by AI.
You are making it sound easy.
 
"Yes and learning absolutely nothing."
Depends how its used tbh. Ive already found it brilliant for learning coding. Its like having your own personal coder or personal tutor depending how you want to use it.

"You are making it sound easy.
Take a look if you havnt already. It does make it super quick and easy to get up and running.

So In terms of pinball mods we're triggering events based on lamps, solenoids, or switches. You can have all the coding done on chat gpt to run multiple events off an arduino, with timers, delays, random percentages etc etc in about 10 minutes with no coding experience. Maybe throw in some photosensors and other little modules. It handles all of it just by telling it what you want to do in plain english.
 
i know its brilliant.

tell it what you want it spits out the code. then all you do is build on it by telling to to "add xx function to above code". keep building until it does everything you want, monitor which pins, trigger outputs for a certain time, make a neopixel effect like fire or waves etc and it just spits all the code out :)

Then just ask it how to wire this all up using eg an optocoupler and will will tell you how to wire it all up, which resistors to use etc etc etc.

just awesome.

Imagine still being at school and having this to use for all your course work etc!!!

dosent bode well for actually getting a job at the end as lots of entry level roles will be going away and done by AI.
sounds interesting. can you post an example of the code it produced please, i’m intrigued.
 
dosent bode well for actually getting a job at the end as lots of entry level roles will be going away and done by AI.
I've been programming professionally for 23 years, I don't see this happening certainly not anytime soon. I've seen code generators come and go that created the boiler plate code for you, this AI is similar plus it doesn't know what's right and wrong true or false it just scraps the web. It seems fine for hobbyist projects but any software house with coding standards and best practices will not get much mileage out of this IMO.

Glad to hear you are able to make it work for you, coding is great fun, I'm privileged as I get paid to do it. Good luck with the project, I look forward to seeing the fruits of your labour.
 
Here guys


I can post a chat log later from home, but would be allot more interesting if you have a quick bash and hear some opinions from people that know how to code properly.

Lots of professional coders on you tube with videos about it. General consensus seems to be for the time its been out and the speed its developing that its going to make a big impact in terms of junior coding roles and as a productivity tool for professional coders.

for pinball bits it took me no time at all to bash together the code to run an interactive topper with leds and a solenoid etc (tested on the bench and seems to work as it should)
 
Quick little chat in the context of a diy topper.


Got of to a false start but gives an idea of how to curate a little project. For coding knuckle dragger like meself it makes things super easy.
 
With any programming language, all we're doing is abstracting away all the binary level opcodes to a higher level language, with somewhat significantly easier (and much less verbose) syntax.

I think AI will eventually become the ultimate form of that. It's a good way off yet though. My experience, similar to Chris, had been hit and miss at best when asking it to solve problems. I find it often hallucinates and comes up with invalid syntax. Other times it points me towards the right idea

Things like GitHub copilot are legit amazing though for professional developers. Well worth looking at if you haven't already
 
Back
Top Bottom