AvE

AvE

ROBO-SHAMBO! Portable Game. (2016x131)


: 22, 2016

I'll show you how to build a simple electronic game for honing your psychic skillz. The secret is knowing that it is all lego. DIY KIT ✪►https://www.etsy.com/ca/listing/464202928/one-rule-to-ruler-them-all-cheeky-jokes◄✪ Long term projects http://www.Patreon.com/AvE GitHub is being a dick hole today. https://github.com/Bumblefuck/ROBO-SHAMBO Here's the code: //This is a simple homemade game of rock paper scissors //It uses a digispark running at 16.5MHz on the microneucleus bootloader //It is glitchy to upload. You'll need a USB 2.0 hub, new 3.0 hubs haven't worked for me. // constants won't change. They're used here to // set pin numbers and values for musical tones const int c = 261; const int d = 294; const int e = 329; const int f = 349; const int g = 391; const int gS = 415; const int a = 440; const int aS = 455; const int b = 466; const int cH = 523; const int cSH = 554; const int dH = 587; const int dSH = 622; const int eH = 659; const int fH = 698; const int fSH = 740; const int gH = 784; const int gSH = 830; const int aH = 880; int buttoncounter = 0; // integer value for storing how many times the game start reed switch has been actuated int counter = 0; // integer value for storing the counter for making muzak const int speakerPin = 0; // PWM pin for speaker on the digispark it's pin P0 const int buttonPin = 1; // the number of the button pin P1 const int rockPin = 2; // the number of the ROCK LED pin P2 const int paperPin = 3; // the number of the PAPER LED pin P3 const int scissorPin = 4; // the number of the SCISSOR LED pin P4 int buttonState = 0; // variable for reading the pushbutton status int RPSval = 0; // variable for storing the button state modulo as to display canned rock paper scissor routine void setup() { // initialize the LED pin as outputs or inputs: pinMode(speakerPin, OUTPUT); pinMode(rockPin, OUTPUT); pinMode(paperPin, OUTPUT); pinMode(scissorPin, OUTPUT);

  • : 2012
  • : 1051
  • : 0
  • YouTube