3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Control Fluorescent Lights with a Laser Pointer and an Arduino

Step 4Adding Web Control

Adding Web Control
If you looked through the sketch, you noticed that I also read the serial port, and act on a few single character commands.  The 'n' character turns on all the lights, and 'f' turns them off.  The numbers '0'-'5' toggle the state of the light connected to that digital output.

So you can easily throw together a CGI script (or servlet, or whatever web technology floats your boat) to control your lights remotely.  The Serial.writes also output whenever a light is changed from user input, so the page can have Ajax updates to show the current state.

Another thing I'm going to experiment with is detecting motion in a room.  People reflect light, and as they move that light will change.  That's the 'delta' part of the write statements I have.

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
3
Followers
2
Author:rmd6502