Hot answers tagged


After a bit of tinkering, I noticed that removing the delay() call in the slave fixed it and there were no more hangs. Also, when using the Servo library to move a servo instead of blinking the led, Servo.write() hangs while Servo.writeMicroseconds() doesn't. I'd mark the answer that has an explanation for this strange behavior.


The onReceive callback get's called from an ISR (interrupt service routine). During the execution of this ISR, the MCU cannot react to other interrupts, since interrupts get automatically turned off at the start of an ISR. Some functions like delay() and millis() rely on interrupts to work correctly, since the timekeeping in the Arduino framework is done ...


Two ideas. 1: Count your grounds. If you count more than 1 you have a problem. Your system should have a single ground, so ANY connection on every component labeled GND should be connected to ground. The reason multiple grounds are a problem is that all your signals are measured relative to ground, so if two components have different ideas of what "ground" ...

Only top voted, non community-wiki answers of a minimum length are eligible