Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 33 of 33

Thread: problem of noob with potentiometer

  1. #26
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,203
    Good luck with the next set.

    For sanity - power the new T_3.6 and watch it blink.

    Then carefully get the 3.3V and GND to the pot and the middle line to one of the analog pins - A3 as in the sketch above - and run that to see the results.

    Not sure if you are ordering it pinned? Probably not for use with Audio board.

    Not good for real use - but with unpowered Teensy and solid wire ends through the pin holes and folded for secure decent 'contact' with just the pin hole plating then add power and the sketch and look for results.

  2. #27
    BTW according to:

    https://www.arduino.cc/reference/en/...ues,and%201023

    analogRead returns values 0..1023 so how you were seeing 20460 is anyone's guess ?!?

  3. #28
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,203
    Quote Originally Posted by wrightflyer View Post
    BTW according to:

    https://www.arduino.cc/reference/en/...ues,and%201023

    analogRead returns values 0..1023 so how you were seeing 20460 is anyone's guess ?!?
    The code used has the read like this :: int cutoff = analogRead(A3) *20;

  4. #29
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    160
    Otherwise you could use an external ADC
    Example 4ch 16bit i2c:
    ADS1115

    Or you could use the DAC/(pwm+RCfilter) output together with any number of voltage comparator's + (optionally 74hc165) to create your own multichannel ADC

  5. #30
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    160
    You could also try using
    pinMode(pin, INPUT_DISABLE).

  6. #31
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    160
    Did you know that you can change the ADC resolution
    To 12bit

    analogReadResolution(12) to read 12bits instead

  7. #32
    From my understanding, the 12bit resolution advertised in the datasheet is more of a theoretical maximum --- in any practical situation, the noise introduced eliminates those two LSB. After smoothing and averaging, best you can reliably hope for in a prototype setting is 10 bit. Please correct me if I'm misguided!

  8. #33
    thanks for all your suggestion! my teensy was already used for prototyping my first midi controller project and I certainly made mistake as a beginner, it s not impossible that I ruined it with my experimentations!

Posting Permissions

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