Advertisement
LightningStalker

ns Pulser

May 29th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. // ns_Pulser.ino
  2. // Apply 62.5ns (@ 16MHz) pulses
  3.  
  4. int laser = 2;
  5.  
  6. void setup() {
  7.   // setup:
  8.   pinMode(laser, OUTPUT);
  9.   noInterrupts();          // disable interrupts just in case
  10. }
  11.  
  12. void loop() {
  13.   // main loop:
  14.   PIND = B00000100;        // writing to the pin register toggles
  15.   PIND = B00000100;        // output on AVR microcontrollers
  16.   delayMicroseconds(100);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement