ATmega32 controller ouputs random button presses despite working on Windows
-
Raspberry Pi 4b+
Retropie version 4.7.19
(I borrowed the above from an old post, but I don't believe I've updated anything since)Hello, I have been building my own DDR dance mat to accompany Outfox running on my Raspberry Pi 4 (along with all of the other games and systems I am running with retropie). No matter the libraries I use, and no matter how well the system works on my machine, all of the inputs into the Raspberry Pi are random.
I have tried setting up the arduino as a keyboard, as well as a HID controller. The pi recognized the arduino as a HID controller properly, and I am writing 4 buttons on the arduino and there are only 4 buttons changing on the pi. However, when doing jstest the 4 buttons just randomly turn on and off (and the same deal when the arduino is set to be a keyboard). It works perfectly when plugged into my windows laptop, but on the pi it freaks out.
I have tried plugging the arduino into a powered USB bus, a USB 3.0 port, and a USB 2.0 port. I have looked everywhere for anyone having a similar problem, but I can't find anything online. Do any of you know about an issue like this, or anything that I can try? I'm at somewhat of a dead end from things I can figure out myself. -
With the information given could be anything.
If the "only" change is pi+RaspiOS vs x86+Windows (ie. wiring and cabling is exactly the same) I assume it it power related.There is a limit how much current can be drawn in total from the Pi4 USB ports
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#maximum-power-outputI would try to run the arduino with an own power supply via its GPIO headers. That would remove any current stress of off the Pi.
I guess your concern is better suited for an arduino tinkering forum.
-
@Lolonois Thanks for the reply. I would think that the powered USB hub would provide all the power demands necessary for the Arduino. Also, when no buttons are being pressed, the Arduino should consume an inconsequential amount of power, however random inputs are being made without any input from me at all.
I'll ask around on an Arduino tinkering forum, thanks for you help!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.