3.2 and a Buttom

Status
Not open for further replies.
Hello folks. Scooby noob here. I’m working through some Teensy button/LED tutorials, but I’m using a different button. Here’s the circuit and script. I’m getting the expected output, but I wanted to make sure that this all looks correct. Thanks in advance for feedback.

ED5F00D3-B858-4B89-AB46-AD5B6EC5BFAD.jpg
 
Yes, this looks correct.
It is a bit better to use the 3v3, because other Teensy models can not stand the 5v. But for a Teensy 3.2 its OK.
Just don't forget it or use 3v3 whenever you can.
 
Thank you, Frank. I will make sure to change that.
Is the ground wire correct? I am assuming that you would only use AGND when using the analog pins.
Also, if I were to add pots to this circuit (connected to the analog pins) would I use the same ground for the button and pots? If yes, which ground would I need to use.
 
Last edited:
welcome home....

For digitalRead your ground is fine. for analogRead you can use AGND, but i use GND. I believe AGND is slightly more insulated.

Regarding button pushes, you will probably get bounce issues--where the button internally bounces causing multiple reads. There is a bounce lib that can alleviate this issue.
 
Thank you, Kris. I will check out the bounce lib.
Based on your response, it sounds like when I add pots (connected to analog pins) to this circuit, I can also use GND for all the components?
It would seem odd to use both GND and AGND in the same circuit, but as I said in the OP, I am Scooby Noob, so maybe it's not odd at all :)
 
Status
Not open for further replies.
Back
Top