RawHID Transmission not found without Arduino IDE

Zachary.Beesley

New member
Hello,

I'm reading data from an accelerometer (Adafruit_LSM6DSOX) connected to a Teensy 4.0. I am then transmitting this data to windows under RawHID. This works. I have the Arduino IDE up, and the data is getting transmitted well. I verified this using a python script with usb.core and simple application called 'SimpleHIDWrite.exe'. Later, I tested this without the Arduino IDE. I get nothing. Nope, nada, zilch. Here's a picture.

1746565827467.png


For reference, here is it working with the Arduino IDE opened/closed.
1746565990620.png


As soon as I disconnect the teensy and reconnect it, it no longer sends data. Is there a simple explanation for this?

One more piece of information. I noticed that only 1 HID device named "Teensyduino RawHID" appears when I have the Arduino IDE open, but 2 HID devices appear without it. I'm not sure this does anything, but it seems to indicate something.

With the IDE
1746566850981.png


Without the IDE
1746566906038.png
 

Attachments

  • accelerometer.ino
    6 KB · Views: 13
Sigh. Yes:
C++:
while (!Serial)
    delay(10); // will pause Zero, Leonardo, etc until serial console opens
Change to
C++:
while (!Serial && millis() < 10000)
    delay(10); // will pause Zero, Leonardo, etc until serial console opens
will only wait 10s for you to open the serial port, and then give up and carry on - adjust to suit.
 
I had a feeling it was something like that..... No surprise, that fixed it. You should know that you are appreciated. The world is a better place because you are here. Thank you for reading through my code to help me.
 
Back
Top