hytheaway

(.github.io)

cerial ver. 2 (dec 2023)

a better way to play street fighter.


dec 12, 2023.
by the time this photo was taken, this was only a fight stick.
there were no components that had anything to do with music.
still, i was super thrilled i got anything to work.

the new biggest hold up was how was i going to connect the buttons
to both the fight stick's usb controller and to the meap board?

there are a few main components to the fight stick: the buttons and the joystick
connect to the cables which connects to the board/microcontroller.

a button normally works by completing a circuit when pressed. some voltage goes
into the button, and then only passes through the button when it's pressed.
when the voltage passes, a button press is registered.

looking at the microcontroller, i gathered it was sending +5v to the button on one pin,
and (presumably) the board would measure when those +5v went to ground on another pin.
the problem is that there was a third pin.

since these buttons lit up, there was a pin dedicated to delivering power
to the leds under the button.

as dumb as it is, this simply stumped me for a few days. i'm not the most acute
when it comes to industry norms in electronics at all.

dec 16, 2023.
the a-ha moment for me came while i was on break during a bartending class.
zooming in on this picture of my notebook will probably make most
properly trained circuit-designers cringe, but i was frantic to record my ramblings

this information may be incorrect but it works for me.
i realized that each button was basically just a series connection. the leds were
always on, so i knew that the +5v first went to the led. the voltage then leaves the
led (and goes into a resistor first, but that's less important) and enters one leg of
the button's switch. this leg connects to a pin on the bottom of the button, which goes to
a dedicated pin on the board/microcontroller. when this pin is receiving voltage,
the logic on the board determines that the button is not being pressed. however,
when this pin is not receiving voltage, then that means that the button
has been pressed, and the voltage post-led is going straight to ground.

i think.


dec 18, 2023.
how long has it been?

.days?
..months?
...years?

how long since i last felt the kiss of sunlight upon my skin?
how long since i held the brim of a hat down as the wind rushed past?
how long since i felt the dew-adorned earth beneath my feet?

i know not, for i am condemned to curiosity.

the sun's light shall not be snuffed in a day. the wind will not cease on a whim.
the dew may not remove itself from the earth as a matter of principle.
neither, then, shall my motivation be extinguished.

in the face of the known & unknown, i persevere.

---

this stage felt like an eternity. my hands have never been all too steady,
and between repeated soldering, testing, and resoldering, i must've inhaled
a concerning amount of fumes.
well, maybe someone else's concern.

i also added a few pass-thru ports: a usb c pass-thru for programming the
meap board, a couple buttons for reset and program, and a hole cut for the
fight stick microcontroller's usb type b port to pass thru.

this stage also is where i learned some of the quirks of these boards.
by far the largest "quirk" that utterly baffled me for nearly half an hour
was related to the new usb c port i had outfitted.
the meap board has a micro usb b port that's used to communicate with
the ESP32. when it came time to extend the port to the edge of the chassis,
i elected to use a usb c port on the chassis, and internally use a micro usb
to usb c adapter to connect the meap board to this pass thru. i figured since the
usb standard is, y'know, standard, this wouldn't be a problem.

i've heard of this before, which is why i didn't spend even more time on things
but this meap board, in the configuration i have it, with the particular adapters
and pass-thru port i have, will not pass data unless the connected usb c cable
is usb a to usb c, obviously with the a side at the computer. usb c to c doesn't work.
it'll pass power, but not data. whatever.

dec 19, 2023.
the day it all comes together. and also the day i actually write code for once.

i basically went into a fugue state for 9 hours and wrote the appropriate code, which
may be found here.

i will be the first to admit that i am not an expert in c or c++, and i am much
less an expert in programming microcontrollers, especially with dynamic instructions.
however, it functions, and as long as i don't touch it, it will continue to function.