Joseph Ogbonna
DIIDevHeads IoT Integration Server
•Created by Enthernet Code on 6/11/2024 in #firmware-and-baremetal
utilize a microcontroller's GPIO pins to control peripheral devices in an IoT embedded software in C
This example is for Arduino,
Connect the LED:
- Connect the LED's anode (long leg) to Arduino Uno's digital pin 13
- Connect the LED's cathode (short leg) to the ground (GND) pin on the Arduino
Arduino Code:
- Pin 13 is set as output using
pinMode()
- digitalWrite()
is used to set the pin high (turn on the LED) or low (turn off the LED)
- delay()
is used to create a 1-second interval between on and off states
You can also use any digital pin of your choice5 replies