Amr Saleh
Published © GPL3+

Game of Thrones Shame Button with Arduino and 1Sheeld

Inspired by shaming Cersei in Game of Thrones, I built a shaming button to mess with my co-workers.

BeginnerFull instructions provided5,685
Game of Thrones Shame Button with Arduino and 1Sheeld

Things used in this project

Story

Read more

Schematics

Button_Shame_Circuit.png

Code

Arduino Shame Button

Arduino
/*

Arduino Shame Button

OPTIONAL:
To reduce the library compiled size and limit its memory usage, you
can specify which shields you want to include in your sketch by
defining CUSTOM_SETTINGS and the shields respective INCLUDE_ define. 

*/

#define CUSTOM_SETTINGS
#define INCLUDE_MUSIC_PLAYER_SHIELD

/* Include 1Sheeld library. */
#include <OneSheeld.h>

/* A name for the button on pin 12. */
int buttonPin1 = 12;

void setup() 
{
  /* Start communication. */
  OneSheeld.begin();
  /* Set the two buttons pins as input. */
  pinMode(buttonPin1,INPUT);
  /* Set the volume. */
  //MusicPlayer.setVolume(10);
}

void loop()
{
  /* Always check button 1 state. */
  if(digitalRead(buttonPin1) == HIGH)
  { 

       /* Turn on the music. */
       MusicPlayer.play();
       /* Wait for 300 ms. */
       OneSheeld.delay(300);
  }
}

Credits

Amr Saleh

Amr Saleh

3 projects • 57 followers
Maker, Breaker, sometimes Fixer, Husband, one of the creators of 1Sheeld & Elkrem tools.

Comments