Post by esemve on Apr 17, 2021 16:52:06 GMT
Hello everybody!
Have anybody tried to emulate a joystick or a keybord with an arduino and use it with this machine? I'm just trying to emulate joystick or keyboard with an Arduino Leonardo. It works perfectly on Windows or Linux machines, they recognize it and i can use it in any program, but the Thec64 does not recognize it. I've found this github.com/hugovangalen/TheC64_Supported_Joysticks file, so i've tried to change the arduino's vendor and product id and succeeded with that, but unfortunately it's not enough, the machine did not recognize it after that either.
Does anybody have an idea what am I missing, or what is the reason why this machine don't want to recognize it?
They are just example codes i've tried multiple libraries and test codes
For example little codes that work on any pc but not on the thec64. I've tried to change the pid, vid, joystick type, button number, axys type etc:
or
Have anybody tried to emulate a joystick or a keybord with an arduino and use it with this machine? I'm just trying to emulate joystick or keyboard with an Arduino Leonardo. It works perfectly on Windows or Linux machines, they recognize it and i can use it in any program, but the Thec64 does not recognize it. I've found this github.com/hugovangalen/TheC64_Supported_Joysticks file, so i've tried to change the arduino's vendor and product id and succeeded with that, but unfortunately it's not enough, the machine did not recognize it after that either.
Does anybody have an idea what am I missing, or what is the reason why this machine don't want to recognize it?
They are just example codes i've tried multiple libraries and test codes
For example little codes that work on any pc but not on the thec64. I've tried to change the pid, vid, joystick type, button number, axys type etc:
include <Joystick.h>
Joystick_ Joystick(0x08,JOYSTICK_TYPE_JOYSTICK, // not work on c64 nor then joystick nor the gamepad settings.
1, 0, // Button Count, Hat Switch Count
true, true, false, // X and Y, but no Z Axis
false, false, false, // No Rx, Ry, or Rz
false, false, // No rudder or throttle
false, false, false); // No accelerator, brake, or steering
void setup() {
Joystick.begin();
Joystick.setXAxisRange(-1, 1);
Joystick.setYAxisRange(-1, 1);
}
void loop() {
digitalWrite(13, 1);
Joystick.pressButton(0);
Joystick.setXAxis(0);
Joystick.setYAxis(-1);
delay(1000);
digitalWrite(13, 0);
Joystick.releaseButton(0);
Joystick.setXAxis(-1);
Joystick.setYAxis(0);
delay(1000);
}
or
#include "Keyboard.h"
void setup() {
Keyboard.begin();
}
void loop() {
digitalWrite(13,0);
delay(1000);
digitalWrite(13,0);
Keyboard.print("hello");
delay(30000);
}