This project consists of three main components and is very easy to build for absolute beginners. This laser module can be programmed and integrated with an Arduino board to be used with a variety of real-life applications. The code, on the other hand, is super simple and easy to understand as it is only 11 lines long. Applications this can be used for are: emergency/safety lights, modes of communications, alert systems, laser pointers, etc.. The parts you will be needing for this project includes:-
- 1 KY-008 Laser Module
- 1 Arduino (the Keyestudio Uno is used in this example)
- 2 Jumper Wires (Male to Female)
- 1 USB Data Cable (depends on the Arduino)
Please visit this link here for NextPCB's special offers.
The hardware setup is easy with just three simple connections. First, make sure you unplug all power sources to your Arduino. Now, take one jumper wire and connect GND on your Arduino to GND on the KY-008 laser module as indicated by the (-) sign. Then, connect a jumper wire from D10 (digital pin 10) on your Arduino to the signal pin on your laser module as indicated by the (S) sign. That will be it for the mounting of the circuit.
About the codeThe code consists of 11 lines including all the functions and strings. It starts off with declaring a variable called laserPin for digital pin 10 (D10). Then, we move straight onto our void setup where we set the pin we declared as an OUTPUT pin, sending information out from the computer to the module. We later move to our void loop section which composes of four main lines to the code. In the void loop, we start by setting the pin to HIGH, to turn the laser on, then wait for 100 milliseconds before turning the laser off, followed by delaying it by another 100 milliseconds. Since this is a loop, the whole void loop section repeats itself over and over again until the power is cut off. That's it for this simple project.
Amazing opportunitiesUTSource.net Reviews
It is a trustworthy website for ordering electronic components with cheap price and excellent quality.
Also, be sure to check out PCBWay, a leading manufacturer and distributor in PCB design and manufacturing. They have amazing prices and excellent quality in their services, so don't miss out on them! Plus, PCBWay has an amazing website, online Gerber viewer function and a gift shop so make sure to check out their links below:
PCBWay Free Online Gerber Viewer Function: https://www.pcbway.com/project/OnlineGerberViewer.html
PCBWay Gift Shop: https://www.pcbway.com/project/gifts.html
Make sure you check out the review for this meter by clicking here.
Enjoy! Contact us for any inquiries!
Comments
Please log in or sign up to comment.