The Monkey Controller, as I have dubbed it, is as simple as controllers come. You may even go to call it an interactive toy if anything. This is because the enclosure itself is originally a puppet with 3 sockets. The sockets are for the left arm, the right arm, and the head. By using tape, threads, alligator clips, and the CPE, this Monkey puppet is ready to help you win and screw over your friends. The Monkey has its components taped and sewed, and currently the entrance to the Monkey’s posterior is sewed shut, but Velcro would have been a better alternative.
Below are the controls for the game Ultimate Chicken Horse:
WASD: Movement of in game arrow/ Character Movement
Space: Jump/Confirm
Shift (When held): Running
E: Rotate Platform
What made this game a perfect choice was the multiple mappings of various things without the need of a mouse. It is very controller friendly. Moving the monkey forward, downward, left, or right press W,S,A, and D respectively. Touching the monkey’s right arm activates a shift press, and touching the left arm writes E. The main mechanic of course, Jumping, is controlled through your voice. While I could have mapped a specific noise for this demonstration, I felt that what I wanted to accomplish with this controller wasn’t just something silly, but sort of artistic? When we play party games, something activates within ourselves that is almost animalistic. And when you play a game as animals, what better way to control it than by acting like one. And why choose a specific one when you can be whichever you want? It’s extremely amusing to be jumping by making a monkey noise, and the whole fact that you can play this game pretty well with this controller was even funnier.
Video
Schematic
Code
#include <Adafruit_CircuitPlayground.h>
#include <Adafruit_Circuit_Playground.h>
#include <Keyboard.h>
//Code by Sebastian Saavedra
int thresh =500; //Capacitve Touch Needed
int sThresh= 68; //Sound Threshhold to activate Space
void setup() {
// put your setup code here, to run once:
pinMode(LEDpin,OUTPUT);
Serial.begin(9600);
while(!Serial);
CircuitPlayground.begin();
}
boolean touched (int t){ //boolean to check if pins have met the threshhold or not
if (t>thresh){
return true;
} else{
return false;
}
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(CircuitPlayground.readCap(A7));
if(touched(CircuitPlayground.readCap(A7))) //if the Monkey's right arm is touched, hold shift
{
Keyboard.press(KEY_LEFT_SHIFT);
}
else{Keyboard.release(KEY_LEFT_SHIFT);}
if(touched(CircuitPlayground.readCap(A1))) //if the Monkey's left arm is touched, press E
{
Keyboard.write('e');
}
//read accelerometer x and y
float x = CircuitPlayground.motionX();
float y = CircuitPlayground.motionY();
float m = CircuitPlayground.mic.soundPressureLevel(10);
if(x<=-6&&x<=-0)
{
Keyboard.press('a');
}
else {Keyboard.release('a');}
if(x>=6&&x>=-0)
{
Keyboard.press('d');
}
else {Keyboard.release('d');}
if(y<=-5&&x<=-0)
{
Keyboard.press('s');
}
else {Keyboard.release('s');}
if(y>=3&&x>=-0)
{
Keyboard.press('w');
}
else {Keyboard.release('w');}
if(m>sThresh ){
Keyboard.press(32);
}
else{Keyboard.release(32);}
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.