Teensy Audio Tutorial, need some help.

Status
Not open for further replies.

drduval

Member
I have connected all the hardware, and loaded up part_1_02_Hardware_Test. However when I run Serial Monitor I see this:
Knob (pin A3) = 151
Knob (pin A1) = 194
Knob (pin A2) = 237
infinitely repeating and filling up the window, while in the video they only show when you press one of the buttons. What could I be doing wrong?

Multiple angles of my setup:
http://imgur.com/a/SU2LH
 
Odd you have the GND to the '+' rail and 3.3V to the '-' rail - but other than those labels they look about right.

Perhaps the switches are rotated 90°? Or >> the GND and SIGNAL need to be on opposite sides?

You may have signal and GND on the same common terminal and the other side is FLOATING?

I don't know how your switches are oriented/designed. Pull one of the switches and check which pairs are COMMON to each other with the switch OPEN, then confirm the other pins only connect when the switch is closed. Then wire accordingly.
 
a bit hard to trace the wires from the photo. the sketch prints A1,A2,A3 values only when they change by 50, and you only have 2 pots hooked, so A1 (i think) is floating, and its value will be changing randomly, and causing it to print. Not sure why A2 and A3 are printing, they seemed to be wired to the 2 pots .... you could get rid of a few jumpers, by wiring the pot's Vcc and GND wires directly to the Vcc and GND rails (edge). And run the pot taps directly to A2 A3 (and A1 if you had 3rd pot). if A2 and A3 are continuously printing, that would suggest the pots are improperly wired.

if you comment out the "annoying" Knob prints, do your button presses work?

the 3rd image is scary, it is wired wrong, and (luckily?) differs from other images. (hope you didn't fry anything)
 
Last edited:
As you may have figured out, I am a complete novice, so I could be doing all sorts of things wrong :p

After commenting out the knobs, the print spam stops, now all I see is: Beep #1, Beep #2, etc.
Pushing the buttons doesn't do anything.

The third picture is the exact same setup as the other pictures, I have changed nothing between them.

I've removed the pots from the breadboard to make everything a little simpler:
https://imgur.com/a/PPu7T
 
if the buttons aren't working, do as defragster suggested: pull the button off the breadboard and rotate it 90 degrees

and yes, the 3rd image is different from all others. the GND pin is top pin on the left of USB connector, but in your 3rd image, your black wire is coming out of the top pin to the right of the USB connector ??

another quick test, with sketch running, jumper pin 1 to GND, that should fire a button print in the loop()
 
Last edited:
Connecting pin 1 to GND works, but connecting pin 0 or 2 doesn't. pin 0 works sometimes, but not consistently. I'm beginning to think my Teensy is damaged somehow.
 
It looks like you have used the audio_tutorial_kit.html hardware layout. Including going with the position on the breadboard for GND and power - even though as noted the breadboard labels of +/- are out of place as the board was rotated 180°.

Mis-wiring may have destroyed something. Did you get the parts kits from PJRC - or are they your own switches? Not all switches are set up as in that drawing - thus the notes in my post above.

The image shown on PJRC above is cleaner and much easier to read. I didn't scan all images as closely as @Manitou. Connecting the GND as PJRC shows with short wire pieces would clean that up a great deal.

Since the switch change triggers the print AFAIK - I focused on those connections. As noted double check the internal connections on your switches - I'm no EE and little related experience - they always puzzle me how to know looking at it what it what ( they are unique and don't always have a clear visual indication) - so I have to test with a meter as noted.
 
Connecting pin 1 to GND works, but connecting pin 0 or 2 doesn't. pin 0 works sometimes, but not consistently. I'm beginning to think my Teensy is damaged somehow.

well, there is a small chance you have modified the sketch such that buttons aren't config'd/tested? maybe, load a fresh copy of the tutorial sketch.
you can run jumpers from GND to A1 A2 and A3 to quiet the "Knob" print's. (if you unjumper A1 (or A2 or A3), you should start getting random value for Knob from floating analog input.)
 
Even with a fresh sketch, the pins are really inconsistent. Pin 1 registers sometimes, and the others do not register at all. Also tried it without a breadboard, making the connections directly to the teensy to rule out a faulty breadboard, tried multiple cables, but the results remain the same.
Guess I have to save up money and just get the pre assembled kit.
 
Did you solder the pins to your Teensy?

I can't see the bottom side of the Teensy from your photo, but it looks like it's flat against the breadboard. Maybe there is solder, but your soldering skills are so good that it is able to still fit flush against the breadboard?

Everything you've said sounds like the problems that happen when few or none of the pins reliably connect, due to no solder.

Not actually soldering the pins is a common beginner misunderstanding. See the pictures on the pins product page:

https://www.pjrc.com/store/header_14x1.html
 
That's a very interesting point. No, I haven't soldered the pins. Mainly because I am scared I will screw it up. Everything is so small and the pin holes are so close together.
Guess I should start practicing my soldering skills.

Thanks!
 
The pins absolutely must be soldered for reliable connection. That's why we also sell Teensy with pre-soldered pins, so people can use it with breadboards without needing to solder anything. But if you got a Teensy without the pins, you really must solder them (or something) to get reliable connections.

I recommend putting the pins into the breaboard first and lay the Teensy onto them, like in the photo on that pins page. Soldering is easiest when none of the parts move around as you touch.
 
I managed to solder the headers, and everything seems to be working now. Thanks everyone for helping me out. I've learned a lot from this. Kudos all around!
 
Status
Not open for further replies.
Back
Top