For all your Electronics Components - "Electronic Component Suppliers Ireland"
In stock
This Keyes device is one of the more common devices found in Arduino sensor kits. Coupled with other components, it can be used to create trip wires or optical effects.
The KY-008 is particularly neat because it can be directly powered from an Arduino output pin as it only draws 30 mA from the processor that has outputs rated for 40 mA.
// KY-008 Tutorial... On then Off
int laserPin = 10;
void setup ()
{
pinMode (laserPin, OUTPUT); // define the digital output interface 13 feet
}
void loop () {
digitalWrite (laserPin, HIGH); // Turn Laser On
delay (1000); // On For Half a Second
digitalWrite (laserPin, LOW); // Turn Laser Off
delay (500); // Off for half a second
}
|
|
|
|
|