https://github.com/codeadamca/arduino-built-in-led
A basic example of turning the built-in LED on and off on an Arduino microcontroller.
https://github.com/codeadamca/arduino-built-in-led
arduino cplusplus led
Last synced: 3 months ago
JSON representation
A basic example of turning the built-in LED on and off on an Arduino microcontroller.
- Host: GitHub
- URL: https://github.com/codeadamca/arduino-built-in-led
- Owner: codeadamca
- Created: 2020-10-02T03:25:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-26T22:10:37.000Z (5 months ago)
- Last Synced: 2025-01-26T23:18:56.777Z (5 months ago)
- Topics: arduino, cplusplus, led
- Language: C++
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arduino and the Builtin LED
A basic example of turning the built-in LED on and off on an Arduino microcontroller.
## Arduino Code
Open up [Arduino Create](https://create.arduino.cc/editor/) and add the following code:
```cpp
// The setup function runs once when you press reset or power the board
void setup() {
// Initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}// The loop function runs over and over again forever
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
// Turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
```> [View the Arduino code on Arduino Create](https://create.arduino.cc/editor/professoradam/4a7f0767-de98-4d02-bfbf-5d69dfd58710/preview)
## Curcuit
You will need to setup the following circuit using your Arduino:

> [View the Circuit on Tinkercad](https://www.tinkercad.com/things/jOaJ7mR6LAt)
> Full tutorial URL:
> https://codeadam.ca/learning/arduino-built-in-led.html***
## Repo Resoures
* [Visual Studio Code](https://code.visualstudio.com/) (or any code editor)
* [Arduino Create](https://create.arduino.cc/editor)