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.

Build your own (cheap!) multi-function wireless camera controller.

Step 16Buttons

Buttons
Now it's time to turn this into a proper remote, one that could replace your current one.

The buttons i bought were designed for PCB mounting, so whilst they fit onto the breadboard with a little encouragement, they need to have wires soldered on for the final board.

Somewhat strangely, buttons with four leads may have some interesting ways of making connections. Pins will connect diagonally, so an input at top left will give you an output bottom right. Pins on the same side will connect too. Pins opposite each other will not connect, however.

Wire one of the button connections into the PC3 pin (25). Use another wire to connecting the button to ground. This will be our shoot button.

The principle behind these switches is simple, with an internal pull up resistor enabled, the pin is set to logical 1 - there is an internal connection to VCC via a resistor. This connection also goes to the pin itself. When the switch is pushed, the electricity takes the path of least resistance and goes through the resistor and into ground - the microcontroller sees logical zero and says "something's happened".

If you're not going to use an external resistor connected to VCC on the pin, it is very important that you don't just connect up the button. You will leave the pin "floating", neither connected to VCC or Ground and that can cause lots of problems with false logic signals.

That's all you need to do to set the circuit up. The code "Remote Test" is fairly simple.

It is exactly the same as before, except we add some more functions and add the input, enabling pull-ups when we do so. When we set the Port as an input, using the DDR register, the PORT register then turns magically into a pull-up enabler. We write 1 into the required bit (for PC3) and that's done.

Next, we have a function for detecting button input, including debouncing (google for more info) the relevant pins to check it was a true button press.

It's worth pointing out that these codes are dreadfully inefficient for power consumption. It would be far better to sleep the processor when nothing is happening (i wanted to do this, but i didn't have the time to rewrite the code to compensate).

Upload the compiled program  to the microcontroller and try out your remote!
Next we're going to add in the LCD screen.
« 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!
15
Followers
1
Author:Whiternoise
I'm a third year physicist at Warwick University, dabbling in electronics and photography and currently seeing what interesting combinations you can make with the two :)