Andrew Jankowski
Created December 9, 2020 © GPL3+

ArmCannonStrangeController

A controller that somewhat resembles that of the iconic character Samus Aran's power beam cannon from the Metroid series.

IntermediateWork in progressOver 1 day10
ArmCannonStrangeController

Things used in this project

Hardware components

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

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Wire Stripper & Cutter, 22-10 AWG Capacity Copper & Aluminium Wires
Wire Stripper & Cutter, 22-10 AWG Capacity Copper & Aluminium Wires
Solder Wire, Lead Free
Solder Wire, Lead Free
Tape, Electrical
Tape, Electrical
Tape, Duct
Tape, Duct

Story

Read more

Schematics

concept design

Buttons press keys and tilt controls basic movement

Code

codeForArmCannonController

JavaScript
Each input allows for the use of one of the buttons/keys used in the emulator for Metroid prime. Keyboard makecode tutorial utilized.
input.onGesture(Gesture.TiltLeft, function () {
    keyboard.type("w")
})
input.onLoudSound(function () {
    keyboard.type("k")
})
input.onGesture(Gesture.TiltRight, function () {
    keyboard.type("s")
})
input.onGesture(Gesture.TiltDown, function () {
    keyboard.type("d")
})
input.onGesture(Gesture.TiltUp, function () {
    keyboard.type("a")
})
forever(function () {
    if (input.pinA1.isPressed()) {
        keyboard.type("y")
    } else if (input.pinA2.isPressed()) {
        keyboard.type("o")
    } else if (input.pinA3.isPressed()) {
        keyboard.type("u")
    } else if (input.pinA4.isPressed()) {
        keyboard.type("i")
    } else if (input.pinA5.isPressed()) {
        keyboard.type("p")
    } else if (input.pinA6.isPressed()) {
        keyboard.type("7")
    } else if (input.pinA7.isPressed()) {
        keyboard.type("8")
    }
})

Credits

Andrew Jankowski
4 projects • 0 followers

Comments