08-30-2012 06:29 PM
Hi All,
I'm working on a project that will have a Mega 2560 control a lot of solenoid valves and some high voltage power supplies. I've notcied that the default boot state of the 2560 with the LVIFA firmware on it leaves digital pins 3,4,5,11,12,21 set to high when the Arduino boots (the rest are set to LOW). This is really undesirable... especially given the high voltage.. Does anyone know what is causing this and how to disable it so that the pins are all defaulting to LOW? I have tried placing the following snippet into the setup():
// Place your custom setup code here
for (int thisPin = 2; thisPin = 53; thisPin ++){
pinMode(thisPin, OUTPUT);
digitalWrite(thisPin, LOW);
}
but this does not work..
Thanks!
08-31-2012 05:48 PM
I would recommend that you see what happens when you don't use LIFA and use a simple sketch on the Arduino. If they still don't all default to low then I would guess that it's in the microprocessor. If you ask in the Arduino forums, they might already know the answer.
09-06-2012 04:43 PM
Hi nebramall
I had the same issue when interfacing Labview and the 2560 Rev3, and I solve it just adding a write vi at the end of my while loop that sets all outputs to low value, if I don't do that, the pin outputs will keep at the last value they had, if you are using only the Arduino sketch, you should try to do the same when you stop the program.
Regards
Pedro
04-02-2014 12:10 PM