From 362d0ed41546a25d8a4a0647aecb6e9ae33fefc7 Mon Sep 17 00:00:00 2001 From: nikhilsigma <106960272+nikhilsigma@users.noreply.github.com> Date: Mon, 6 Jun 2022 18:38:55 +0900 Subject: [PATCH] Update i2c.md Builtin LED is not set as output in Reader (I2C slave) program. Thus the LED is not turning on. So following line needs to be added. pinMode(LED_BUILTIN,OUTPUT); // sets onBoard LED as output --- .../hardware/03.nano/boards/nano-every/tutorials/i2c/content.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/hardware/03.nano/boards/nano-every/tutorials/i2c/content.md b/content/hardware/03.nano/boards/nano-every/tutorials/i2c/content.md index 659ac44256..7129ad7823 100644 --- a/content/hardware/03.nano/boards/nano-every/tutorials/i2c/content.md +++ b/content/hardware/03.nano/boards/nano-every/tutorials/i2c/content.md @@ -91,6 +91,7 @@ Let's start by adding the `Wire.h` library by adding the `#include ` sta void setup() { Wire.begin(8); // join i2c bus with address #8 Wire.onReceive(receiveEvent); // function that executes whenever data is received from writer + pinMode(LED_BUILTIN,OUTPUT); // sets onBoard LED as output } ``` @@ -186,6 +187,7 @@ If you choose to skip the code building section, the complete code for both the void setup() { Wire.begin(8); // join i2c bus with address #8 Wire.onReceive(receiveEvent); // function that executes whenever data is received from writer + pinMode(LED_BUILTIN,OUTPUT); // sets onBoard LED as output } void loop() {