Hi, first off my apologies if I selected the wrong category...
I basically made a whole project that contains a few things like an i2c, IR sensor and IR remote receiver. My code works the whole time except when I press on any button of the remote. This freezes my arduino and the serial monitor stops working either until I reset the arduino. After a few hours of trying I've found that if I remove the i2c part of my code (removing Wire.begin(); alone is apparently enough), the IR remote sensor works so it really has something to do between the IR remote and the i2C. Any clue how to fix this?
the i2c is PCF8574, the IR remote sensor is VS 1838B and I'm using a Leonardo ETH
Thank you a lot for the help!!
I made some progress! I added an interrupt that happens when I press on any button of the remote. and added a delay to the void loop (). the code works but is very unstable. The program can still crash and the arduino somehow doesn't read all my inputs so I usually have to time my button clicks perfectly or something. I don't really get it...