Usb host shield project won't boot up normaly

Hello community,

I'm new here and this is my first post. I've searched for a while now for the solution, but I can't find it, so here it goes.

I have an arduino leonardo and a usb host shield for it. My plan is to use usb mouse instead of an analog stick to control an rc helicopter for its right hand control as I got used to it in pc gaming. So my idea was to write a software that translates the mouse movement to that specific voltage, that the potentiometers of the heli controller are reducing the reference voltage.

So first I was trying to add stuff to the usb host shield 2.0 examples package USBHIDBootMouse software.

My application is loaded successfully on the arduino and works as designed. When the mouse is replugged, it leds light up and software works flawlessly. Then I remove the arduino from my pc (win 7) and plug it in to a 5V 1A DC supply. The power led lights up on the arduino but no mather what, my software won't start. When I plug in the mouse, the leds on the mouse light up for aprox 1 second, then turns off again. Plugging arduinoback on my pc shows the same behaviour. When I reupload with the IDE, the software it works again.

Please give me an advice on how I can troubleshoot what errors occure while using it headless. The 5V power supply is reliable, and I haven't had any problems with other headless software running on the leonardo itself. The new factor here is the host shield.

Various methods to debug headless, it depends on what hardware you have availble

e.g. do you have a LCD screen module you could attach to the arduino

Or you could use one of those bluetooth serial modules and send text to the PC via bluetooth

If all you have is the LED on the board, you could try morse code or just various sequences of flashes

Hello rogerClark,

Thank you for the reply!
I tried out setting Led flashing in the beginning of the loop function. It works when freshly uploaded to the microcontroller, but it won’t start blinking when I’m using a charger cord instead of powering it from pc usb port with a running os .
It seems to me, that before the sketch loads up on the board, there is some kind of communication between pc and the arduino, which is missing, when I’m using the charger only.

But it’s weird since the blinking led basic sketch works with and without pc involved. So it might also be software related.

How would you approach this problem?