Hi again
I have 2 questions.
1) I would like to change the USB Device name of teensy LC when i compile this example sketch.
I have tried changing the name and lenght in usb-desc.h (folder arduino/hardware/teensy/cores/teensy3)
And it works, but when i click in properties of the device, the original name appears again (Only i see my modified name in Devices&printers in Windows).
Do i need to make other more changes?
2) Is possible to change the device icon by default? The joystick device appears as a keyboard, but i don't know how change it.
Thanks in advance
I have 2 questions.
1) I would like to change the USB Device name of teensy LC when i compile this example sketch.
Code:
/* Basic USB Joystick Example
Teensy becomes a USB joystick
You must select Joystick from the "Tools > USB Type" menu
Pushbuttons should be connected to digital pins 0 and 1.
Wire each button between the digital pin and ground.
Potentiometers should be connected to analog inputs 0 to 1.
This example code is in the public domain.
*/
void setup() {
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
}
void loop() {
// read analog inputs and set X-Y position
Joystick.X(analogRead(0));
Joystick.Y(analogRead(1));
// read the digital inputs and set the buttons
Joystick.button(1, digitalRead(0));
Joystick.button(2, digitalRead(1));
// a brief delay, so this runs 20 times per second
delay(50);
}
I have tried changing the name and lenght in usb-desc.h (folder arduino/hardware/teensy/cores/teensy3)
#define PRODUCT_NAME {'K','e','y','b','o','a','r','d','/','M','o','u','s','e','/','J','o','y','s','t','i','c','k'}
#define PRODUCT_NAME_LEN 23
And it works, but when i click in properties of the device, the original name appears again (Only i see my modified name in Devices&printers in Windows).
Do i need to make other more changes?
2) Is possible to change the device icon by default? The joystick device appears as a keyboard, but i don't know how change it.
Thanks in advance
Last edited: