From 40a0c0b674fc9b6bba4412a8c123e5af6eb684fc Mon Sep 17 00:00:00 2001 From: David Kadish Date: Mon, 11 Mar 2024 16:41:18 +0100 Subject: [PATCH] Update ble-cheat-sheet.md Fixed the RGB description and example code to reflect the fact that they are active-LOW and not active-HIGH. --- .../tutorials/cheat-sheet/ble-cheat-sheet.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/content/hardware/03.nano/boards/nano-33-ble-sense/tutorials/cheat-sheet/ble-cheat-sheet.md b/content/hardware/03.nano/boards/nano-33-ble-sense/tutorials/cheat-sheet/ble-cheat-sheet.md index f4392123c1..6a62281378 100644 --- a/content/hardware/03.nano/boards/nano-33-ble-sense/tutorials/cheat-sheet/ble-cheat-sheet.md +++ b/content/hardware/03.nano/boards/nano-33-ble-sense/tutorials/cheat-sheet/ble-cheat-sheet.md @@ -354,15 +354,9 @@ If you want to learn more on how to use the Microphone, please check out the tut ## RGB -To turn ON the pixels, write a `HIGH` state to the LED: +The Nano 33 BLE Sense's RGB LEDs are active-LOW, so they are switched in the opposite way to the LED_BUILTIN. -```arduino -digitalWrite(LEDR, HIGH); //RED -digitalWrite(LEDG, HIGH); //GREEN -digitalWrite(LEDB, HIGH); //BLUE -``` - -To turn OFF the pixels, write a `LOW` state to the LED: +To turn ON the pixels, write a `LOW` state to the LED. ```arduino digitalWrite(LEDR, LOW); //RED @@ -370,6 +364,14 @@ digitalWrite(LEDG, LOW); //GREEN digitalWrite(LEDB, LOW); //BLUE ``` +To turn OFF the pixels, write a `HIGH` state to the LED: + +```arduino +digitalWrite(LEDR, HIGH); //RED +digitalWrite(LEDG, HIGH); //GREEN +digitalWrite(LEDB, HIGH); //BLUE +``` + We can also choose a value between 255 - 0 to write to the LED: ```arduino