Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: 3.2 and a Buttom

  1. #1

    3.2 and a Buttom

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

    Click image for larger version. 

Name:	ED5F00D3-B858-4B89-AB46-AD5B6EC5BFAD.jpg 
Views:	21 
Size:	179.0 KB 
ID:	24176

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,280
    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.

  3. #3
    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 by JarOfSparkle; 03-24-2021 at 09:43 PM.

  4. #4
    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.

  5. #5
    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

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    966
    Put simply AGND is a noise-filtered version of GND

  7. #7
    Thank you, Mark, and also thanks again to Frank and Kris. I appreciate the information and advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •