I got the FamilyMall KY-008 laser module a little while back, and have just got around to testing it with the Arduino Uno. Before I get to the technical bits, I want to point out how flimsy the module itself was. I hadn’t even used it, and already the laser component was ready to come off the board. The other complaint I have is the trial-and-error procedure I needed to go through to find out what the pins did. I’ve made a diagram, if it helps others, but I’ve seen elsewhere that the results aren’t consistent.
Here’s the pin setup that worked for me:
You can upload the code below to the Arduino, and you’ll get the laser to flash according to the value set for blinkTimer. Plug the ‘data’ cable into digital 10, as specified in the code.
int blinkTimer = 500;
int pinNo = 10;
void setup ()
pinMode (pinNo, OUTPUT);
void loop ()
digitalWrite (pinNo, HIGH);
digitalWrite (pinNo, LOW);
//middle pin is +, right pin is -, and left pin is data
Once set up, the laser is surprisingly bright — though not really well focused. It appears to have a good range to it.