Project tutorial
Self-Punching Helmet

Self-Punching Helmet © CC BY

How to get punched playing video games!

  • 1,499 views
  • 3 comments
  • 10 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
3drag
3D Printer (generic)

Apps and online services

About this project

Hi, my name is Joel and I run a YouTube channel called Integza.

I recently decided to start a small series of videos in which I'll build original gadgets made out of electronics, 3D printed parts and a lot of imagination.

This project is the first gadget! Future Gadget #001!

A helmet that punches me in the face each time I get punched in a fighting video game.

Video on the project

Code

Code for the Arduino Uno C#
This is the code programmed on the Arduino IDE that needs to be uploaded to the respective board.
#include <Stepper.h>
#include "LedControl.h"
#include "pitches.h"
const int stepsPerRevolution = 1024;
Stepper myStepper(stepsPerRevolution, 4, 5, 6, 7);

LedControl lc=LedControl(12,10,11,1);


int melody[] = {
  NOTE_C5, NOTE_D5, NOTE_E5, NOTE_F5, NOTE_G5, NOTE_A5, NOTE_B5, NOTE_C6};

/* we always wait a bit between updates of the display */
unsigned long delaytime1=500;
unsigned long delaytime2=50;

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW); 
  myStepper.setSpeed(12);
  // initialize the serial port:
   /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}
 
// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
    
  if (sensorValue > 450){
    tone(8, melody[7], 3000);
    digitalWrite(LED_BUILTIN, HIGH); 
    LEDsON();
    myStepper.step(stepsPerRevolution);
    delay(500);

    LEDsOFF();
    myStepper.step(-stepsPerRevolution);
    delay(500);

    
  }
  else{
    digitalWrite(LED_BUILTIN, LOW); 
  }
  delay(200);  
   // delay in between reads for stability
}

void LEDsON() {
  /* here is the data for the characters */
  byte a[8]={B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111};


  /* now display them one by one with a small delay */
  lc.setRow(0,0,a[0]);
  lc.setRow(0,1,a[1]);
  lc.setRow(0,2,a[2]);
  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);
  lc.setRow(0,5,a[5]);
  lc.setRow(0,6,a[6]);
  lc.setRow(0,7,a[7]);
 
}

void LEDsOFF() {
  /* here is the data for the characters */
  byte a[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};


  /* now display them one by one with a small delay */
  lc.setRow(0,0,a[0]);
  lc.setRow(0,1,a[1]);
  lc.setRow(0,2,a[2]);
  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);
  lc.setRow(0,5,a[5]);
  lc.setRow(0,6,a[6]);
  lc.setRow(0,7,a[7]);
 
}
Code for the ESP32 Feather BoardC#
This is the code programmed on the Arduino IDE that needs to be uploaded to the respective boards.
#include "BluetoothSerial.h" //Header File for Serial Bluetooth, will be added by default into Arduino

BluetoothSerial ESP_BT; //Object for Bluetooth

int incoming;
void setup() {
  Serial.begin(9600); //Start Serial monitor in 9600
  ESP_BT.begin("ESP32_LED_Control"); //Name of your Bluetooth Signal
  pinMode(13, OUTPUT);
   digitalWrite(13, HIGH);
   delay(2000);
   digitalWrite(13, LOW);
  
  
}

void loop() {
  Serial.println("5");    
  if (ESP_BT.available()) //Check if we receive anything from Bluetooth
  {
    incoming = ESP_BT.read(); //Read what we recevive   
    if ( incoming == 53)
    {
      digitalWrite(13, HIGH);
      delay(500);
      digitalWrite(13, LOW); 
    }

     if ( incoming == 54)
    {
      digitalWrite(13, HIGH);
      delay(500);
      digitalWrite(13, LOW); 
    }
  }
  delay(20);
}
VS Studio AppC#
This is the app that interfaces the computer with the helmet.
No preview (download only).

Custom parts and enclosures

Future Gadget #001 - 3D Models
Here you can find all the 3D Models used in the project.
3d_models_8XlIKIEK0m.rar

Schematics

Future Gadget #001-Circuit Schematics
Here you can find an image with all the components properly connected.
Circuit schematics j42pgr7iw2

Comments

Similar projects you might like

Avenger Assembled: Iron Man Helmet & Arc Reactor

Project tutorial by Gregory O. Voronin and Phil V

  • 5,124 views
  • 6 comments
  • 23 respects

Otto DIY+ Arduino Bluetooth Robot Easy to 3D Print

Project tutorial by Team Otto builders

  • 58,136 views
  • 122 comments
  • 188 respects

Arduino101 / tinyTILE BLE: Match-Making Sunglasses

Project tutorial by Kitty Yeung

  • 12,291 views
  • 5 comments
  • 41 respects

Minimal MIDI Drum Kit with 3D Printer

Project tutorial by ryokosaka

  • 11,279 views
  • 1 comment
  • 31 respects

Android App-Based Home Automation System Using IOT

Project tutorial by Team Autoshack

  • 30,254 views
  • 18 comments
  • 98 respects

Arduino Apple Watch

Project tutorial by Karlstrom

  • 19,323 views
  • 3 comments
  • 70 respects
Add projectSign up / Login