USB

Hello !

I am new on arduino. I am trying to convert the signal from an absolute rotary encoder (ems22a) to a Pixhawk (protocol -I2C). I upload the code attach to this topic on an arduino nano.

This code is working when my USB is plugged to my computer. However, when I boot my pixhawk without the USB link on my arduino, I don't receive the data. The led TX is not solid green. There is only the led power which is laight.

I try also to plug my usb after I boot my pixhawk and it works. The led TX is green. I can remove the link afterward and it works.

It seems like I have to boot the transmission TX with my USB (once the led TX is green it works but I can only light it with the USB link) which is really weird.

Do you know how I can solve the problem ? Is there a problem in my connection or in my program ?

Thank

ems22.ino (2.74 KB)

I don't see anything wrong in your code. I never used this rotary encoder, but maybe it's an electrical problem, due to supply power.

You say

when I boot my pixhawk without the USB link on my arduino

can you be more specific : what kind of supply then?

If you are French speaker, you can also ask for help in the French section of the forum.

A schematic would be helpful

I don't know anything about your rotary encoder but if there is a Forum member who does it is very unlikely that your Title will suggest to him (or her) that s/he could help you.

I suggest you edit your Original Post and write a Title that summarizes your problem. Perhaps "Problem reading EMS22A encoder when USB is disconnected"

...R

@Fabien102, please do not cross-post. Other thread removed.