- Published on
Initial Electronics
I created the initial code for the most important electrical components.
This code was made as a proof of concept and includes delays, which will not be used once all of the code segments are integrated.
The aim of the flipper code is to do the aforementioned switch between 50V and 5V with PWM. All the bumpers and slingshots will be controlled with almost identical code. The lights flash in order once the points are greater than a certain value (not included in this code). Every time the ball rolls over a switch, a certain number of points are added to the point tally. Finally the display writes these points on an LCD display.
In future I will combine all this code into one block that runs through each loop.
This code was made as a proof of concept and includes delays, which will not be used once all of the code segments are integrated.
The aim of the flipper code is to do the aforementioned switch between 50V and 5V with PWM. All the bumpers and slingshots will be controlled with almost identical code. The lights flash in order once the points are greater than a certain value (not included in this code). Every time the ball rolls over a switch, a certain number of points are added to the point tally. Finally the display writes these points on an LCD display.
In future I will combine all this code into one block that runs through each loop.
Arduino Electrical Schematic
Arduino circuits
Code
Attached is the functional code for the flippers, the lights, the point calculators, and the display.