Arduino Script /* Tested on arduino mega256 R3 arduino code v1.0.4 connect arduino gnd to - on sensor connect arduino 5V to middle pin on sensor connect arduino pin 11 to the S on the sensor Tones are produced by chaning the delay time in the for loops You will see a difference in the intensity of the laser beam between the two loops. Play with the numbers. */ int KY_008=10; void setup() { pinMode(KY_008,OUTPUT);// } void loop() { unsigned char i;// while(1) { for(i=0;i<80;i++)//output light of one frequency i<80 change the value to another number { digitalWrite(KY_008,HIGH); delay(10);//delay 1ms change the 10 to another number digitalWrite(KY_008,LOW); delay(5);//delay 1ms change the 10 to another number } for(i=0;i<100;i++)//output light of another frequency i<100 change the value to another number { digitalWrite(KY_008,HIGH);//sound delay(6);//delay 2ms change the 6 to another number digitalWrite(KY_008,LOW);//silent delay(60);//delay 2ms change the 60 to another number } } }