Maker Pro
Maker Pro

Teensy++ help (microcontroller // digital & analog)

R_K

Nov 16, 2013
1
Joined
Nov 16, 2013
Messages
1
Hi,
I'm pretty rusty on my electronics but would really like to get back into it because I have a large interest in designing midi controllers and synthesizers. I've attached a picture of a quick sketch I did of one part of a midi controller design I'm working on. The problem at hand is this: the two buttons on the face of the part are connected to 2 digital pins on a teensy++ microcontroller. Obviously when you press the button it turns the pin on and when you release it turns it off, I've coded the teensy to increment a variable up or down each time one of the buttons is hit and then send a midi message based on that variable. The question I have now is how would I set up the LED's to light up based on the value set in the variable? Would I have to use 7 analog pins on the teensy for each side of the part? is there some sort of IC component that does the same thing as the code does that I could also connect to the buttons and then connect the LED's to that somehow? There's a limited number of analog pins but I want some sort of indicator of the value of the variable placed on the part itself and the LED thing was all that I could think of. The variable will stay between - 3 and 3.

Thank you in advance for your help.
 

Attachments

  • DOC027.pdf
    20.5 KB · Views: 73

jpanhalt

Nov 12, 2013
426
Joined
Nov 12, 2013
Messages
426
You could do it with 3 pins and read the binary output. You could use just two pins and an up/down counter, or you could do some sort of serial communication with just one pin.The up/down counter might be the simplest.

John
 
Top