fix rgb colors

This commit is contained in:
hugo LAMY
2025-03-12 19:45:42 +01:00
parent f42bd2f869
commit d55f42d6db

View File

@@ -30,9 +30,9 @@ void init_rgb() {
}
void set_rgb(uint8_t r, uint8_t g, uint8_t b) {
OCR2B = r; // Red (PD3, Timer2 OCR2B)
OCR0B = g; // Green (PD5, Timer0 OCR0B)
OCR0A = b; // Blue (PD6, Timer0 OCR0A)
OCR0B = r; // Red (PD3, Timer2)
OCR0A = g; // Green (PD5, Timer0)
OCR2B = b; // Blue (PD6, Timer0)
}
// convert hex to int : https://stackoverflow.com/a/39052987