Have to reset Arduino on startup

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
bdcurry
Posts: 20
Joined: Tue Feb 16, 2021 1:28 am

Have to reset Arduino on startup

#1 Post by bdcurry »

Hello -- I have an odd somewhat annoying issue happening. I'm running 4 Mega's, everything works, I can flash all four. The issue is with one device, AM will start, all devices show up in the home panel as connected (name, channel) but the device won't "run" unless I reset (either the switch on the Arduino or unplug/plug) the device. If I start AM, everything shows up and I flash the device, the hardware outputs all as expected. It seems while the device loads and looks connected to AM, it's not running (and it's just a single device). I've swapped cables, physical ports but same result. Looking for any input on where to go to fix the issue. Thanks in advance for any input.

bdcurry
Posts: 20
Joined: Tue Feb 16, 2021 1:28 am

Re: Have to reset Arduino on startup

#2 Post by bdcurry »

Some additional info -- I tried changing the com port (through device manager to another port number, re-flashed the device to the same channel), same issue. Using the onboard Arduino reset button doesn't work, nor does rebooting the computer, shutting all power off. The only way to get it to function is, after launching AM (all devices show as connected) and X-Plane, to unplug the usb cable at the Arduino in question (and the power supply), plug it back in, wait until AM recognizes it again and then...all functions as it should. No issues with the other 3 Mega's, all run fine. While I can run through this sequence every time I run X-Plane, it's more of a nagging inconvenience. Thanks in advance for any thoughts.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Have to reset Arduino on startup

#3 Post by Ralph »

Not really clear to me is if it happens to one Arduino only. Isn't this one maybe faulty?

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Have to reset Arduino on startup

#4 Post by Ralph »

Saying that I have to think of this.
Image

But if you swap addresses, so if the faulty one is D for example, make it A and set A to D.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Have to reset Arduino on startup

#5 Post by jph »

What are you running from that specific arduino ?
You may well be demanding too much power from the USB.
Are you running lots of displays etc ? - if so power it from an external source to try.
Joe. CISSP, MSc.

bdcurry
Posts: 20
Joined: Tue Feb 16, 2021 1:28 am

Re: Have to reset Arduino on startup

#6 Post by bdcurry »

Thanks for the input @Ralph and @jph.

Answers to the questions:
> only one of the 4 Mega's had the problem
> changed channels, same issue
> that device is running the hardware ("add hardware" devices) for the panel/instrument dimmers (pots), EGT dial (encoder), clock/timer (3 push button switches), an LCD character display for the COM/NAV frequencies, trim wheel (encoder) and a 20 led "bar" that simulates the trim wheel indicator
> I have all the Mega's setup with separate power supplies

jph's input drove me to look at the hardware side. I disconnected all devices in device manager except this one and turned off all the connected instruments, proceeding instrument by instrument to see if the problem persisted. To make a long story short, I traced it down to the LED trim indicator bar. Disconnected every wire and started adding each back in one at a time (and shutting down AM, X-Plane and rebooting the computer each time). In that process, I noticed that I had the same pin binding for two different LED's -- LED 33 was bound to pin 34 and LED 34 was bound to pin 34. I changed that on the home screen for pin assignments, added everything back in and....everything is right with the world. I appreciate the nudge in the right direction that allowed me to stumble on the problem. And I double, triple checked all the assignments, pins, wires....sometimes you can'[t see the forest through the trees. Thanks again.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Have to reset Arduino on startup

#7 Post by jph »

Glad you got it sorted.
It would be very very useful for AM to have a 'duplicate' assignment warning for the hardware pins. All too easy to make a mistake
Joe
Joe. CISSP, MSc.

Post Reply