Project showcase
Arduino + Geometry Dash!

Arduino + Geometry Dash! © GPL3+

This is an Arduino joystick(?) controlling 1 of the versions of geometry dash!

  • 1,912 views
  • 1 comment
  • 3 respects

Components and supplies

Apps and online services

About this project

I made this because I like Arduino and I'm a gamer. So I started simple and made this.

Code

My codeJava
The first half is the Arduino code and the 2nd is processing code.
The code is C and Java
int butten = 2;

void setup() {
  Serial.begin(9600);
}

void loop(){
  int buttenState = digitalRead(butten);
  Serial.println(buttenState);
  delay(2);
}// dab more

//------------------Processing code below, paste below------

/* (begin) import processing.serial.*;
Serial myPort;
int X=10;
int Y=200;
PFont font;
float inByte;
void setup(){
  size(1000,400);
  font=createFont("Arial-BoldItalicMT-48",50);
   println(Serial.list());
   myPort = new Serial(this, Serial.list()[0], 9600);
   myPort.bufferUntil('\n');
}

void draw(){
  background(#000000);
  fill(226,160,18);
  rect(0,300,1000,100);
  rect(0,0,1000,100);
  fill(255,246,0);
  rect(950,100,50,200);
  fill( #00FF00 );
  rect(X,Y,10,10);
  X=X+1;
  if(inByte>=1){
    Y=Y-1;
  } else{
    Y=Y+1;
  }
  if(X>950){
    textFont(font);
    text("YOU DID IT!!!",500,200);
    X=975;
    Y=200;
  }
  if(Y>300||Y<100){
    text("YOU LOSE!!!",500,200);
    X=10;
    Y=200;
  }
}

void serialEvent (SerialcPort) {
  // get the ASCII string:
  String inString = myPort.readStringUntil('\n');

  if (inString != null) {
    // trim off any whitespace:
    inString = trim(inString);
    // convert to an int and map to the screen height:
    inByte = float(inString);
    println(inByte);
  }
}//dab more
(end)*/

Schematics

The Wiring
This is the same as digital read serial in the Arduino examples
Button o4lpcv1xuv

Comments

Author

Cookie555
Cookie555
  • 1 project
  • 1 follower

Additional contributors

  • Giving code and schematics by Arduino

Published on

March 19, 2017

Members who respect this project

De69a62a2b35333cd5fa834c6f202b80 qq25e5259b25be25e72589258720160323205203 uugfypsuzu

and 3 others

See similar projects
you might like

Similar projects you might like

Amazon Dash Button for Arduino!

Project tutorial by Brian Carbonette

  • 9,829 views
  • 3 comments
  • 24 respects

Dash Button Santa with Arduino MKR1000

Project tutorial by Team Programarfacil

  • 1,812 views
  • 0 comments
  • 7 respects

Dash Lid

Project tutorial by claude garrett

  • 4,322 views
  • 0 comments
  • 11 respects

Amazon Dash Replenishment Pens

Project tutorial by Alex Merchen

  • 627 views
  • 0 comments
  • 3 respects

Temp. And Humidity Sensor With A CR2032 For Over 1 Year!

Project showcase by Talk2

  • 24,937 views
  • 29 comments
  • 75 respects

Hacking Qualcomm (Quick Charge) QC 2.0/3.0 With ATtiny85

Project tutorial by Shahariar

  • 5,897 views
  • 11 comments
  • 40 respects
Add projectSign up / Login