Arduino Full Stack
Ctrlk
  • Preface
  • Part 1 - Introduction
  • Chapter 1. Getting Started with Arduino
  • Chapter 2. Programming Grammar
  • Part 2 - Sensors
  • Chapter 3. LED Sensors
  • Chapter 4. Infrared Sensors
    • 4.1 Infrared Emitter and Receiver
    • 4.2 Laser Emitter
    • 4.3 Infrared Remote Control
    • 4.4 IR Obstacle Avoidance
    • 4.5 IR Line Tracking
  • Chapter 5. Audio Sensors
  • Chapter 6. Magnetic Sensors
  • Chapter 7. Touch Sensors
  • Chapter 8. Thermist Sensors
  • Chapter 9. Switches
  • Chapter 10. Other Sensors
  • Chapter 11. More Discussions on Sensors
  • Part 3 - Motors
  • Chapter 12. Motors
  • Part 4 - Display
  • Chapter 13. Display
  • Part 5 - Communication
  • Chapter 14. Communication
  • Part 6 - Arduino Based Mini Automated Vehicle
  • Chapter 15. Assemble a Mini Automated Vehicle
  • Chapter 16. Remote Control
Powered by GitBook
On this page
  1. Chapter 4. Infrared Sensors

4.2 Laser Emitter

Hardware Wiring

Laser Emitter

Sketch

The code can be found at Examples_Arduino - sensor-kit-for-arduino - _007_LaserEmit - _007_LaserEmit.ino.

Previous4.1 Infrared Emitter and ReceiverNext4.3 Infrared Remote Control

Last updated 7 years ago

  • Hardware Wiring
  • Sketch
void setup()
{
  pinMode(13, OUTPUT); // Define Pin 13 as Digital Output
}
void loop() {
  digitalWrite(13, HIGH); // Open Laser Head
  delay(1000);
  // Delay 1 second
  digitalWrite(13, LOW); // Close Laser Head
  delay(1000);
  // Delay 1 second
}