New answers tagged


It has come to my attention I never posted a followup to this but I was actually able to solve this problem by shielding the wire going from the switch to the arduino. The switch's wire was about 2 to 3 inches long and I wrapped aluminum foil around it, which shielded the signal from what I suspected was EMI induced by the switching converters.


Some time ago, I timed digitalWrite() and direct port write commands by looping over 10,000 executions of each and timing them with millis(). I made both tests on a 16MHz Atmega 328p at 16MHz. For digitalWrite(13, LOW), I got 2.7usec / call. For PORTB &= 0x20;, I got 0.15usec / statement. (The direct port access was executed 10 times within the loop to ...

Top 50 recent answers are included