Public projects 2

Arduino Conversion of an EM Pinball Machine

Project showcase by Frogger1108

  • 8,600 views
  • 15 comments
  • 33 respects

Homemade Arduino Pinball Machine

Project showcase by Frogger1108

  • 22,166 views
  • 17 comments
  • 74 respects

Toolbox 3


Respected projects 3

Build a Pinball Machine

Project showcase by grahamasker

  • 5,331 views
  • 12 comments
  • 14 respects

Pinball Sounds and Music

Project tutorial by Bob Blomquist

  • 8,624 views
  • 4 comments
  • 22 respects

Arduino Controlled Pinball Machine

Project tutorial by Bob Blomquist

  • 47,709 views
  • 50 comments
  • 126 respects

  • Arduino Conversion of an EM Pinball Machine 10 months ago

    Hi Didi,
    Sry for the late answer, I currently moved and it was chaos the last two months.
    Here is the code:

    ###########
    // Chapter 7 - Communications
    // I2C Slave
    // By Cornel Amariei for Packt Publishing

    // Include the required Wire library for I2C
    #include <Wire.h>
    #include <SPI.h>
    #include <SdFat.h>
    #include <FreeStack.h>
    //and the MP3 Shield Library
    #include <SFEMP3Shield.h>
    #include <EEPROMex.h>
    #include <Arduino.h>
    SdFat sd;
    SFEMP3Shield MP3player;

    //SOUNDS

    //1 Bumper
    //2 Slingshots
    //3 Spinner
    //4 Target
    //5 Kickoutlane
    //6 Ball lost
    //7 Game Over
    //8 Bonus increase
    // 9 Start
    //10 Captive
    //11Roll
    // 12 Theme
    //13 Skillshot
    //14 Bande
    //15Extra
    int x = 99;

    void setup() {
    //Serial.begin(19200);

    // Start the I2C Bus as Slave on address 9
    Wire.begin(9);
    // Attach a function to trigger when something is received.
    Wire.onReceive(receiveEvent);
    sd.begin(SD_SEL, SPI_FULL_SPEED);
    MP3player.begin();
    MP3player.setVolume(0, 0);
    }

    void loop() {

    if (x == 1) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.setVolume(0, 0); 
    MP3player.playMP3("001.mp3");
    x = 99;
    

    }

    if (x == 2) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("002.mp3");
    
    x = 99;
    

    }
    if (x == 3) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("003.mp3");
    
    x = 99;
    

    }

    if (x == 4) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("004.mp3");
    
    x = 99;
    

    }
    if (x == 5) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("005.mp3");
    
    x = 99;
    

    }
    if (x == 6) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("006.mp3");
    
    x = 99;
    

    }

    if (x == 7) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("007.mp3");
    
    x = 99;
    

    }
    if (x == 8) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("008.mp3");
    
    x = 99;
    

    }

    if (x == 9) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("009.mp3");
    
    x = 99;
    

    }

    if (x == 10) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("010.mp3");
    
    x = 99;
    

    }
    if (x == 11) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("011.mp3");
    
    x = 99;
    

    }
    if (x == 12) {

    MP3player.stopTrack();MP3player.setVolume(40, 40); 
    MP3player.playMP3("012.mp3");
    
    x = 99;
    

    }
    if (x == 13) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("013.mp3");
    
    x = 99;
    

    }
    if (x == 14) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("014.mp3");
    
    x = 99;
    

    }
    if (x == 15) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("015.mp3");
    
    x = 99;
    

    }
    if (x == 16) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("016.mp3");
    
    x = 99;
    

    }
    if (x == 17) {

    MP3player.stopTrack();MP3player.setVolume(0, 0); 
    MP3player.playMP3("017.mp3");
    
    x = 99;
    

    }
    // delay(1);
    }

    void receiveEvent(int bytes) {
    x = Wire.read(); // read one character from the I2C
    Serial.println(x);

    }

    ###############

  • Homemade Arduino Pinball Machine 11 months ago

    Hi. The coding for the Aztec took quite a while, but once you build the different modules (bumpers, scoring, displays, etc.) it gets easier. the most time consuming part is of course testing the code on the machine itself :)

  • Arduino Conversion of an EM Pinball Machine 11 months ago

    Very nice. You invested a lot of work, I'm curious to see the new playfield. Reading through you project I found a lot of good ideas I should have implemented (like fusing the Mosfets....and yes, they blow sometimes :( )
    I recently switched to a mix between Mosfets for the "fast" coils like Bumpers and Relays for "slow" coils like Drop Targets and such. Works fine in my new pinball. I'll write up a project once I'm done moving :)

Add projectSign up / Login