You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plugged a joycon module into my elegoo uno R3, and sent its readings to A1, A2, A3, setting its board to hoodloader uno and changing the A to PC, it still could read the values, but changing it to hoodloader 16u2, analog read just returns 0? and i need 16u2 as i want to use my board as a HID! heres my code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I plugged a joycon module into my elegoo uno R3, and sent its readings to A1, A2, A3, setting its board to hoodloader uno and changing the A to PC, it still could read the values, but changing it to hoodloader 16u2, analog read just returns 0? and i need 16u2 as i want to use my board as a HID! heres my code:
#include <HID-Project.h>
#include <HID-Settings.h>
void setup() {
Serial.begin(9600);
Mouse.begin();
}
void loop() {
int xPos = analogRead(PC1);
int yPos = analogRead(PC2);
Serial.print(xPos);
Serial.print(',');
Serial.println(yPos);
Mouse.move(1 ? yPos > 1000 : -1 ? yPos < 500 : 0, 1 ? xPos > 1000 : -1 ? xPos < 500 : 0);
}
Beta Was this translation helpful? Give feedback.
All reactions