Timeline for Arduino, problem with interrupt and SSD1306 OLED
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 25, 2023 at 0:41 | answer | added | Patriboom | timeline score: 0 | |
Feb 3, 2021 at 11:03 | history | edited | ocrdu | CC BY-SA 4.0 |
added 41 characters in body; edited title
|
Feb 3, 2021 at 10:30 | answer | added | Majenko | timeline score: 2 | |
Feb 3, 2021 at 10:22 | history | edited | Majenko | CC BY-SA 4.0 |
edited title
|
Feb 3, 2021 at 10:20 | comment | added | Majenko | I2C communication (usually) requires interrupts. You can't use interrupts inside an interrupt. Ergo, you can't use I2C communication inside an interrupt. There's very little you can do in an interrupt. | |
Feb 3, 2021 at 10:17 | history | edited | Majenko | CC BY-SA 4.0 |
edited title
|
Feb 3, 2021 at 10:07 | comment | added | StarCat | You don’t have to disable and re-enable the interrupts inside an ISR (in fact, you really shouldn’t). Also, an ISR should be very short (as few instructions as possible) and yours isn’t. Take @chrisl ‘s advice and set a flag inside the ISR, test for the flag in the main loop and leave handling of the display code to the main loop. | |
Feb 3, 2021 at 9:40 | history | edited | Ola A | CC BY-SA 4.0 |
added 99 characters in body
|
Feb 3, 2021 at 9:24 | comment | added | chrisl | I would guess, that the display code needs interrupts to work during its execution, which is not the case inside an ISR. Serial will just put the data into the buffer, which then gets pushed out later via interrupts. Try to set a flag inside the ISR and then execute the display code in the main loop, if the flag was set | |
Feb 3, 2021 at 9:17 | review | First posts | |||
Feb 3, 2021 at 14:21 | |||||
Feb 3, 2021 at 9:16 | history | asked | Ola A | CC BY-SA 4.0 |