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.


A Framework For Making Affordable & Stylish Modular Controllers (USB to MIDI, HID, or Serial)

Step 4Testing Individual Components

Testing Individual Components
«
  • IMG_2183-1.jpg
  • IMG_2188-6.jpg
  • IMG_2202-20.jpg
  • IMG_2191-9.jpg
  • IMG_2195-13.jpg
  • IMG_2198-16.jpg
  • IMG_2200-18.jpg
  • testing_arduino.jpg
  • last photo ←
»

This is surely the most critical step of this Instructable. You need to build a test circuit so you can understand how the components are hooked up and used with the Teensy. This step will also cover serial communication using the Teensy. 

In the images you will see a breadboard which has the following components (left to right)
  • Teensy++ microcontroller
  • Two potentiometers 
  • One rotary encoder with pushbutton
  • One mini LED
  • Three mini pushbuttons
Hookup the circuit as you see it in the images. Likely, your pushbuttons will look much different than mine, but don't worry about that because all pushbuttons hook up the same - one end to ground and the other to a digital input. If you have pushbuttons which are not breadboard-friendly just solder some wire connections to them quickly. 

You may also notice my connections between the pushbuttons look a bit goofy (the one yellow wire). I did this for a reason. It shows that instead of connecting the pushbutton ground directly to the ground linked to the Teensy (blue strip) you can plug the ground from one pushbutton to the next, so long as one of the pushbuttons is linked to the Teensy ground. This is important cause when you are wiring your components into your panel the ground connection on the Teensy is usually not as convenient as the ground of the neighboring components. This is an excellent way to reduce the number of wires in your controllers. I also did the same thing for the potentiometers with the grey wires. 

Usually LEDs should have resistors in series to prevent them from burning out over time. Since this was just a quick test I left the resistor out of the circuit. Also note that LEDs are polarized, meaning they have a power and ground end. If not hooked up correctly they with fail to light up or burn out. 

Once you have the circuit hooked up, proceed to opening to code. Read the many comments within the code to help you understand what is going on. 

Upload the code attached to your Teensy++ and launch the serial monitor. The serial monitor should give you feedback as you interact with the components: 'button 24 pressed', 'analog 2 value: 344', 'encoder +'. If your serial monitor is constantly spewing out values then you have hooked up something incorrectly. Make sure your serial monitor is running at 9600bps. 

The LED is set to flash at different brightness levels depending on which pushbutton you click. 

Before you move onto the next step, ensure this is working and you (without doubt) understand how to hook up each of these components to the Teensy++.

All code can be found here on GitHub. For this section use the code titled 'Testing Components'. Click 'ZIP' in the top-left to download.



« Previous StepDownload PDFView All StepsNext Step »
3 comments
Feb 10, 2012. 7:23 AMSuperspaceghost says:
Hi, it mentions a diagram in the abovce step but I cant see it, kust the code in the above pde file?
Feb 10, 2012. 10:07 AMSuperspaceghost says:
Great thanks, just like to say what a great project. Really looking forward to trying it. It will be my first venture into electronics.

SSG

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!
66
Followers
2
Author:Fuzzy-Wobble
I am a human from planet earth. I use my brain to make things. fuzzywobble.com