Albert Cheung
Published

Strange Controller Project

A controller for fighting games that will make things harder for you

BeginnerShowcase (no instructions)37
Strange Controller Project

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Alligator Clips
Alligator Clips
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Code

Controller

Java
input.onGesture(Gesture.TiltLeft, function () {
    keyboard.key("a", KeyboardKeyEvent.Down)
    pause(1000)
    keyboard.key("a", KeyboardKeyEvent.Up)
})
input.onGesture(Gesture.TiltDown, function () {
    keyboard.type("w")
})
input.onGesture(Gesture.TiltRight, function () {
    keyboard.key("d", KeyboardKeyEvent.Down)
    pause(1000)
    keyboard.key("d", KeyboardKeyEvent.Up)
})
input.onGesture(Gesture.TiltUp, function () {
    keyboard.key("s", KeyboardKeyEvent.Down)
    pause(1000)
    keyboard.key("s", KeyboardKeyEvent.Up)
})
input.pinA4.onEvent(ButtonEvent.Click, function () {
    keyboard.type("o")
})
input.touchA1.onEvent(ButtonEvent.Click, function () {
    keyboard.type("j")
})
input.pinA5.onEvent(ButtonEvent.Click, function () {
    keyboard.type("i")
})
input.pinA2.onEvent(ButtonEvent.Click, function () {
    keyboard.type("k")
})
input.pinA3.onEvent(ButtonEvent.Click, function () {
    keyboard.type("l")
})
input.pinA6.onEvent(ButtonEvent.Click, function () {
    keyboard.type("u")
})

Credits

Albert Cheung
4 projects • 0 followers

Comments