I have a board with 3 PCF8574 for expanding Arduino ports, which I access through Wire protocol. I also have a rotary encoder connected to pins 2 and 4 (not the expanded ones). The project is working fine, but when I move the rotary encoder, some time after, my Serial connection simply crashes. I have to close the Serial Monitor and open it again for it to work. The weird part is that if I don't use the Wire interface or don't use the rotary encoder, everything works fine. When both are working together, it also works, but after 5 seconds messing with the rotary encoder, the serial connection crashes.
Anyone has an idea on what is going on? The source code is quite large, that's why I didn't posted it, but if you want, I'll be happy to provide.
I have a board with 3 PCF8574 for expanding Arduino ports, which I access through Wire protocol. I also have a rotary encoder connected to pins 2 and 4 (not the expanded ones). The project is working fine, but when I move the rotary encoder, some time after, my Serial connection simply crashes. I have to close the Serial Monitor and open it again for it to work. The weird part is that if I don't use the Wire interface or don't use the rotary encoder, everything works fine. When both are working together, it also works, but after 5 seconds messing with the rotary encoder, the serial connection crashes.
What is the last thing that gets printed? Ohhh wait, we need to see the code for that information to make sense. Then... I don't know. When you close and open the serial monitor, you reset the Arduino... so it starts fresh.
How did you implement the encoder readings?
Fergo:
Anyone has an idea on what is going on? The source code is quite large, that's why I didn't posted it, but if you want, I'll be happy to provide.
Regards,
Fergo.
Two people might have already found the problem if you posted the code...