![Alex Marino](/img/default-banner.jpg)
- Видео 30
- Просмотров 9 056
Alex Marino
Добавлен 1 фев 2018
Видео
Testing Google Daydream VR
Просмотров 406 лет назад
Created my own simple scene in unity and was testing it. Also was testing if i was able to successfully add google daydream controller function to my scene
MicroController Gaming Controller Joystick Testing
Просмотров 1966 лет назад
Using an Adafruit Feather to create a controller that replaces the keyboard for computer gamers while still allowing precise mouse movements.
Pan Tilt Joystick Arduino Control
Просмотров 3196 лет назад
Using an Arduino to have a joystick to control a Pan Tilt servo mount.
Camping Radio Arduino Hack
Просмотров 836 лет назад
Using Arduino, LCD Screen, and Lithium battery, to create a screen that displays how much charge is left in the battery.
Hello friends, I have problems with an iplayer 3. Error Code 1 and also error code 7. Has that ever happened to you? and if they could solve it. Thanks.
These philips controllers are a complete garbage.
Idea: web based cardboard app that can use the daydream controller and headset so it can still be used
ok but where is the beginning of this video? How do you build the effect?
There is an online manual you can download. But to add and effect you drag it from the right panel onto your timeline on the bottom
Hi this vignesh colour keep changing how make software update ?
So... How long did it last?
Some Code or explanation would have been nice. :/
Final Code //Alex Gaming Controller #include <Keyboard.h> int button1 = 13; int button2 = 12; int button3 = 11; int button4 = 10; int button5 = 6; const int SW_pin = 2; // digital pin connected to switch output const int X_pin = 0; // analog pin connected to X output const int Y_pin = 1; // analog pin connected to Y output char shift = KEY_LEFT_SHIFT; void setup() { delay(5000); Keyboard.begin(); pinMode(SW_pin, INPUT); digitalWrite(SW_pin, HIGH); Serial.begin(9600); pinMode(button1, INPUT_PULLUP); pinMode(button2, INPUT_PULLUP); pinMode(button3, INPUT_PULLUP); pinMode(button4, INPUT_PULLUP); pinMode(button5, INPUT_PULLUP); delay(5000); } void loop() { /* Serial.print("Switch: "); Serial.print(digitalRead(SW_pin)); Serial.print(" "); Serial.print("X-axis: "); Serial.print(analogRead(X_pin)); Serial.print(" "); Serial.print("Y-axis: "); Serial.println(analogRead(Y_pin)); Serial.print(" "); */ if (analogRead(Y_pin) < 500) { Keyboard.press( 's' ); Serial.print("s "); // delay(5); } if (analogRead(Y_pin) > 900) { Keyboard.press( 'w' ); Serial.print("w "); // delay(100); } if (analogRead(Y_pin) > 500 && analogRead(Y_pin) < 900) { Keyboard.release( 'w' ); Keyboard.release( 's' ); // delay(100); } if (analogRead(X_pin) > 900) { Keyboard.press( 'd' ); Serial.print("d "); // delay(100); } if (analogRead(X_pin) < 500) { Keyboard.press( 'a' ); Serial.print("a "); // delay(100); } if (analogRead(X_pin) > 500 && analogRead(X_pin) < 900) { Keyboard.release( 'a' ); Keyboard.release( 'd' ); // delay(100); } if (digitalRead(SW_pin) == LOW) { Keyboard.press(shift); Serial.print("space"); // delay(500); } else { Keyboard.release(shift); // delay(500); } if (digitalRead(button1) == HIGH) { Keyboard.press( 'x' ); Serial.print("x "); // delay(500); } else { Keyboard.release( 'x' ); // delay(500); } if (digitalRead(button2) == HIGH) { Keyboard.press( 'c' ); Serial.print("c "); // delay(500); } else { Keyboard.release( 'c' ); // delay(500); } if (digitalRead(button3) == HIGH) { Keyboard.press( 'q' ); Serial.print("q "); // delay(500); } else { Keyboard.release( 'q' ); // delay(500); } if (digitalRead(button4) == HIGH) { Keyboard.press( 'z' ); Serial.print("z "); // delay(500); } else { Keyboard.release( 'z' ); // delay(500); } if (digitalRead(button5) == HIGH) { Keyboard.press( 'e' ); Serial.print("e "); // delay(500); } else { Keyboard.release( 'e' ); // delay(500); } }
Final Code (including Joystick and Buttons) #include <Keyboard.h> int button1 = 13; int button2 = 12; int button3 = 11; int button4 = 10; int button5 = 6; const int SW_pin = 2; // digital pin connected to switch output const int X_pin = 0; // analog pin connected to X output const int Y_pin = 1; // analog pin connected to Y output char shift = KEY_LEFT_SHIFT; void setup() { delay(5000); Keyboard.begin(); pinMode(SW_pin, INPUT); digitalWrite(SW_pin, HIGH); Serial.begin(9600); pinMode(button1, INPUT_PULLUP); pinMode(button2, INPUT_PULLUP); pinMode(button3, INPUT_PULLUP); pinMode(button4, INPUT_PULLUP); pinMode(button5, INPUT_PULLUP); delay(5000); } void loop() { /* Serial.print("Switch: "); Serial.print(digitalRead(SW_pin)); Serial.print(" "); Serial.print("X-axis: "); Serial.print(analogRead(X_pin)); Serial.print(" "); Serial.print("Y-axis: "); Serial.println(analogRead(Y_pin)); Serial.print(" "); */ if (analogRead(Y_pin) < 500) { Keyboard.press( 's' ); Serial.print("s "); // delay(5); } if (analogRead(Y_pin) > 900) { Keyboard.press( 'w' ); Serial.print("w "); // delay(100); } if (analogRead(Y_pin) > 500 && analogRead(Y_pin) < 900) { Keyboard.release( 'w' ); Keyboard.release( 's' ); // delay(100); } if (analogRead(X_pin) > 900) { Keyboard.press( 'd' ); Serial.print("d "); // delay(100); } if (analogRead(X_pin) < 500) { Keyboard.press( 'a' ); Serial.print("a "); // delay(100); } if (analogRead(X_pin) > 500 && analogRead(X_pin) < 900) { Keyboard.release( 'a' ); Keyboard.release( 'd' ); // delay(100); } if (digitalRead(SW_pin) == LOW) { Keyboard.press(shift); Serial.print("space"); // delay(500); } else { Keyboard.release(shift); // delay(500); } if (digitalRead(button1) == HIGH) { Keyboard.press( 'x' ); Serial.print("x "); // delay(500); } else { Keyboard.release( 'x' ); // delay(500); } if (digitalRead(button2) == HIGH) { Keyboard.press( 'c' ); Serial.print("c "); // delay(500); } else { Keyboard.release( 'c' ); // delay(500); } if (digitalRead(button3) == HIGH) { Keyboard.press( 'q' ); Serial.print("q "); // delay(500); } else { Keyboard.release( 'q' ); // delay(500); } if (digitalRead(button4) == HIGH) { Keyboard.press( 'z' ); Serial.print("z "); // delay(500); } else { Keyboard.release( 'z' ); // delay(500); } if (digitalRead(button5) == HIGH) { Keyboard.press( 'e' ); Serial.print("e "); // delay(500); } else { Keyboard.release( 'e' ); // delay(500); } }
Thank you
Code pls
Ok