-
Notifications
You must be signed in to change notification settings - Fork 139
Description
Hello,
first of all, thanks for this great tool Alan, there is nothing equal out there.
Now to my strange problem, I hope I did everything correct.
In my short Video you can simply see the jumping axes: https://youtube.com/shorts/iRZpt27eo_4?feature=shared (bad cutted, in the end is an extreme jump, first completely to the right, then left, then back to center.
Tried now to build it back to the most easy state to reproduce it.
setupMegaJoy(); in setup and so on...
void loop() {
megaJoyControllerData_t controller = getBlankDataForMegaController();
int test = analogRead(A0);
controller.analogAxisArray[2] = test;
controller.analogAxisArray[3] = test;
controller.analogAxisArray[4] = test;
setControllerData(controller);
}
I'm currently sitting in a train, thats why I don't have a potentiometer or something else. Did now the following: plugged 3.3V into A0 and removed it. Repeated that until the error occured. These are the results: https://youtube.com/shorts/82W1IY1axrM?feature=shared (X-Rotation jumping)
As you can see, single axes are jumping back and forward even if test should have the exact same value to all axes. I'm pretty sure that these jumps are the exact same ones that occure in the first video. I'm also pretty sure that these jumps are not from the analog input source. Hope this experiment proved that a bit.
Used an original Arduino Mega made in Italy. Reproducable on every computer and also on Elegoo Arduinos.
Tested values 10 bit, 0 - 1024 (and 16 bit Arduino int)