From d55f42d6dbe9d85891e6cb6bad59c6d99bab2d6d Mon Sep 17 00:00:00 2001 From: hugo LAMY Date: Wed, 12 Mar 2025 19:45:42 +0100 Subject: [PATCH] fix rgb colors --- module03/ex03/colors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module03/ex03/colors.c b/module03/ex03/colors.c index 1d30630..e82c5d0 100644 --- a/module03/ex03/colors.c +++ b/module03/ex03/colors.c @@ -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