I have a robot built around a MEGA 2560. I avoided using pins 0 and 1 so that uploading code to the robot would not affect any motors. Instead I put my motors on pins 17-21.
When I upload new firmware I get a movement on pins 19/20/21 that lasts the length of time it takes to upload the sketch.
Is there communication on these pins I'm not aware of? Is there something I can do to mitigate this unwanted behavior, easier than moving to other pins? (I have a PCB shield now, moving pins costs two weeks and $50)
The bot: Marginally Clever Robots on Instagram: "Programmable controlled movement on all five axies #achieved! #prototyping #hardware"
Try 10K pulldown resistors on the offending pins. ALl IO is setup as INPUT during the download until the sketch can start up take over control of the pins. Pulling them low should help if the pins are inputs to a motor drive or similar.
I'm confused. if the mega pins are set as inputs, why would my motor driver receive anything?
The lines, not driven by the Mega, are "floating" and their level could be anything.
Add the 10K so you know what they are.