https://github.com/codeadamca/arduino-laser
A basic example of controlling a laser using an Arduino.
https://github.com/codeadamca/arduino-laser
arduino cplusplus laser
Last synced: 3 months ago
JSON representation
A basic example of controlling a laser using an Arduino.
- Host: GitHub
- URL: https://github.com/codeadamca/arduino-laser
- Owner: codeadamca
- Created: 2020-10-07T03:01:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-26T22:04:58.000Z (5 months ago)
- Last Synced: 2025-01-26T23:18:07.766Z (5 months ago)
- Topics: arduino, cplusplus, laser
- Language: C++
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arduino and a Laser
A basic example of controlling a laser using an Arduino.
## Arduino Code
Open up [Arduino Create](https://create.arduino.cc/editor/) and add the following code:
```csharp
int laserPin = 2;void setup() {
pinMode(laserPin, OUTPUT);
}
void loop() {
digitalWrite(laserPin, HIGH);
delay(1000);digitalWrite(laserPin, LOW);
delay(1000);}
```> [View the Arduino code on Arduino Create](https://create.arduino.cc/editor/professoradam/bd120ce7-2329-44db-a472-d7aa5f767a20/preview)
You will need to setup the following circuit using your Arduino:

> [View the Circuit on Tinkercad](https://www.tinkercad.com/things/4gRQcWldkm2-arduino-laser)
> Full tutorial URL:
> https://codeadam.ca/learning/arduino-laser.html---
## Repo Resources
- [Visual Studio Code](https://code.visualstudio.com/) or [Brackets](http://brackets.io/) (or any code editor)
- [Arduino Create](https://create.arduino.cc/editor)