Skip to content

Commit 362d0ed

Browse files
nikhilsigmamarqdevx
authored andcommitted
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
1 parent 651aa53 commit 362d0ed

File tree

1 file changed

+2
-0
lines changed
  • content/hardware/03.nano/boards/nano-every/tutorials/i2c

1 file changed

+2
-0
lines changed

content/hardware/03.nano/boards/nano-every/tutorials/i2c/content.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Let's start by adding the `Wire.h` library by adding the `#include <Wire.h>` sta
9191
void setup() {
9292
Wire.begin(8); // join i2c bus with address #8
9393
Wire.onReceive(receiveEvent); // function that executes whenever data is received from writer
94+
pinMode(LED_BUILTIN,OUTPUT); // sets onBoard LED as output
9495
}
9596
```
9697

@@ -186,6 +187,7 @@ If you choose to skip the code building section, the complete code for both the
186187
void setup() {
187188
Wire.begin(8); // join i2c bus with address #8
188189
Wire.onReceive(receiveEvent); // function that executes whenever data is received from writer
190+
pinMode(LED_BUILTIN,OUTPUT); // sets onBoard LED as output
189191
}
190192
191193
void loop() {

0 commit comments

Comments
 (0)