musef
Published © GPL3+

Voice Activated Catapult (Poor Man's Bluetooth Module)

Hey Siri, fire! --> catapult fires. Because of limitations over knowledge and equipment I came up with my own wireless communication module.

BeginnerFull instructions provided1,121
Voice Activated Catapult (Poor Man's Bluetooth Module)

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
iPhone
Apple iPhone
×1
wireless ( bluetooth ) speaker
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Aluminium foil
×1

Software apps and online services

Arduino IDE
Arduino IDE
Apple Shortcuts

Story

Read more

Custom parts and enclosures

Mini Catapult

Schematics

schematics of servo and button

Code

servo and push button

Arduino
servo is attached to pin 9 and when pin num. 2 is high the servo rotates.
// Include the Servo library 
#include <Servo.h> 
// Declare the Servo pin 
int servoPin = 9; 
// Create a servo object 
Servo Servo1; 

const int buttonPin = 2;     // the number of the pushbutton pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  Servo1.attach(servoPin); 
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH
  if (buttonState == HIGH) {
    // turn servo
    Servo1.write(180); 
    delay(3000);
  } else {
    // turn servo back
    Servo1.write(0); 
  }
}

Credits

musef

musef

0 projects • 0 followers

Comments