Arduino Servo Robotic Drummer - Does Wipeout

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 17

  • @_lowfer
    @_lowfer 5 лет назад +1

    This is simple (yet, at the same time complex) but amazing

    • @demej00
      @demej00  5 лет назад +1

      Thanks Lowfer. It was a simple and fun project to do and one of the few that I still keep around and use to accompany my uke and guitar. Couldn't have done it though if I hadn't found the rhythm drum score for Wipeout.

  • @cherylcox788
    @cherylcox788 6 лет назад +1

    We really enjoyed that....

    • @demej00
      @demej00  6 лет назад +1

      Thanks Cheryl. Hope you and Doug and family are well.

  • @samarthk162
    @samarthk162 5 лет назад +2

    can we cahange the tune if yes how

    • @demej00
      @demej00  5 лет назад +1

      Here is the code for Arduino Uno and two servos:
      #include
      // servo drummer Jim Demello June 2018
      int beatParms[2] [100];
      const int buttonPin = 13; // the number of the pushbutton pin
      int buttonState = 0;
      int buttonOn = 0;
      Servo myservo1,myservo2;
      int servoPin6 = 6; //servo
      int servoPin7 = 7;
      void myServo(int servoPosition, int servoNumber) {
      if (servoNumber == 1) {
      myservo1.write(servoPosition);
      }
      if (servoNumber == 2) {
      myservo2.write(servoPosition);
      }
      }
      void doOneEighthNote(int servoNumber,int beat, int delayVal) {
      //int delayVal = 60;

      if (servoNumber == 1) {
      if (beat) {beat = 18; // if beat = 1 then add a little more servo down for stronger thump
      }
      myServo(150 + beat,servoNumber); //down
      delay(delayVal);
      myServo(100,servoNumber);//up
      delay(delayVal);
      }

      if (servoNumber == 2) {
      if (beat) beat = -18;
      myServo(60 + beat,servoNumber); //down
      delay(delayVal);
      myServo(80,servoNumber);//up
      delay(delayVal);
      }
      }

      void setup()
      {
      Serial.begin(9600);
      myservo1.attach(servoPin6, 1000, 2000); // attaches the servo on pin 9 to the servo object
      myservo1.write(100);
      myservo2.attach(servoPin7, 1000, 2000); // attaches the servo on pin 9 to the servo object
      myservo2.write(90);
      pinMode(buttonPin, INPUT_PULLUP);
      digitalWrite(buttonPin, HIGH);
      }
      //////////////////////////////////////////////////////////////////////////////////////////////
      /////////////////////////////////////////////////////////////////////////////////////////////
      void loop() {
      buttonState = digitalRead(buttonPin);
      buttonState = HIGH;
      if (buttonState == HIGH && buttonOn == 0) { // if button high then start drum sequence
      // buttonOn = 1;
      //wipeout(); // wipeout drum routine
      if (random(1,3) == 1) fourQuarterTime2();
      else fourQuarterTime();
      //oneTime();
      // delay(500); // delay some to give time to open button back up

      }
      }
      ///////////////////////////////////////////////////////////////////////////////////////////////
      /////////////////////////////////////////////////////////////////////////////////////////////
      void oneTime() {
      while(1) {
      int beatParms[2][100] = {{1,2}, {0,0}}; // servo number and beat (1=beat,0=nobeat)

      for (int c=0;c

  • @Jony8142
    @Jony8142 3 года назад +1

    Hey at 1.5x speed they've really got it down

    • @demej00
      @demej00  3 года назад +1

      Thanks Jonathan, tried that and it sounds much better, still missing a beat here and there but that's an Arduino for ya.

  • @rayenyazid1181
    @rayenyazid1181 4 года назад +1

    Can you give me the python code of arduino ?
    Thank you

    • @demej00
      @demej00  4 года назад

      Sorry, I don't do Python, just Arduino C++.

    • @rayenyazid1181
      @rayenyazid1181 4 года назад

      Can you give me the c++ code and the pin connections of the servo controllers

    • @demej00
      @demej00  4 года назад +1

      Details here: www.instructables.com/id/Arduino-Servo-Drum-Machine/

    • @rayenyazid1181
      @rayenyazid1181 4 года назад

      Jimmy Demello thank you

  • @Innertemplesounds
    @Innertemplesounds 2 года назад

    Have you made these for purchase?

    • @demej00
      @demej00  2 года назад +1

      No. It was just a oneoff. Besides I live in a foreign country with no shipping to USA. Would be a fun project for someone with a 3d printer.

  • @samarthk162
    @samarthk162 5 лет назад +1

    please reply fast its urgent ok

  • @samarthk162
    @samarthk162 5 лет назад +1

    email me circuit diagram and coding