Some beginners questions

Status
Not open for further replies.

yentz

Member
Hi,
I am a beginner so I am sorry for maybe asking the obvious.
1. When using potentiometers for analogue read on Teensy 4 (3,3 V) which resistance would be ideal to make sure that the whole way of turning it is used and not just half of it?
2. With analogue read of potis what is the best way to make sure the read values don't go up and down all the time but still have a pretty good response from the potentiometer?
3. If I want to use an encoder with a display and a menu. Could you point me towards a library that is easy to understand and a small display that is compatible. It is not about money but the huge screens are just way to big for what I would like to do.
4. I see there is a midi capability which is great, are there any tutorials regarding reading a clock signal from a modular system? I suppose the signal (5V usually) has to be reduced to max 3.3 but I don't know how to proceed. Again if there was a tutorial that would be awesome.
5. Are the differences of tve different models just speed, ram, current etc or are there differences in terms of libraries supported etc? There are lots of projects for the older models but I can't tell how those could be used on a Teensy 4.
Sorry for all those beginners questions but I thought I better ask before spending lots of time and frustration just because I was missing some basic information.

Thanks for helping.

Jens
 
1. When using potentiometers for analogue read on Teensy 4 (3,3 V) which resistance would be ideal to make sure that the whole way of turning it is used and not just half of it?

Connect the center pin of the pot to tothe analog input pin on Teensy, and the other 2 pins of the pot to 3.3V and GND.


2. With analogue read of potis what is the best way to make sure the read values don't go up and down all the time but still have a pretty good response from the potentiometer?

Lower resistance pots give more stable results. Below 5K or 10K gives diminishing returns and uses more power (dissipated as heat inside the pot). Adding a small ceramic capacitor between the analog pin and GND can help reduce noise. The ResponsiveAnalogRead library can also be used to clean up noisy signals in software.


3. If I want to use an encoder with a display and a menu. Could you point me towards a library that is easy to understand and a small display that is compatible. It is not about money but the huge screens are just way to big for what I would like to do.

https://www.pjrc.com/teensy/td_libs_Encoder.html

https://www.pjrc.com/store/display_ili9341_touch.html


4. I see there is a midi capability which is great, are there any tutorials regarding reading a clock signal from a modular system? I suppose the signal (5V usually) has to be reduced to max 3.3 but I don't know how to proceed. Again if there was a tutorial that would be awesome.

https://www.pjrc.com/teensy/td_libs_MIDI.html


5. Are the differences of tve different models just speed, ram, current etc or are there differences in terms of libraries supported etc? There are lots of projects for the older models but I can't tell how those could be used on a Teensy 4.

Pretty much all of the basic libraries run on every 32 bit Teensy, and many even work on the old 8 bit models. For that ILI9341 library, Teensy 3.2 and higher give much better performance. Likewise for audio synthesis & effects, the faster boards can do so much more. But for a basic MIDI controller, any of them works fine. Teensy LC is a popular choice for MIDI controller projects which don't need audio processing.
 
Thanks a lot for your answers.
I saw the display on the website but it is still too large.
I am having some 0.96 Oleds but they are not supported. Are there any about this size which are?
 
I am having some 0.96 Oleds but they are not supported
What type of OLED do you have? With the SSD1306 controller? I2C or SPI? With the correct library these OLEDs are supported on Teensy.

Paul
 
Yes I think it is 1306 using i2c. The cheapest there are I think. I don't mind buying new ones. I would just like to keep the format +-
 
Well, in that case you need to install the following 2 libraries: Adafruit_GFX & Adafruit_SSD1306.
Those libraries run on Teensy 4.0.

Paul
 
Adafruit_SSD1306 works well with those displays. Just install it from the Library Manager in Arduino and it will "just work" on Teensy.
 
Hi,
unfortunately I dont seem to get the oled working.
It is not an original Adafruit oled. When scanning the I2C Bus it says SSD1306, Digispark Oled.
I would just order some others but find 17,50 for the adafruit one a bit steep considering the other oleds were 2 euro each.
 
Well, at least the display is alive because it reacts to I2C. And apparently it has I2C address 0x3C.
Did you use this I2C address in your sketch?
In this sketch: Examples > Adafruit SSD1306 > ssd1306_128x64_i2c.ino, set the address to 0x3C.

Code:
void setup() {
  Serial.begin(9600);

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  if(!display.begin(SSD1306_SWITCHCAPVCC, [U]0x3C[/U])) { // Address 0x3C for DigisparkOLED
    Serial.println(F("SSD1306 allocation failed"));
    for(;;); // Don't proceed, loop forever
  }

Hope this helps,
Paul
 
Thanks for your help. It says
ssd1306_128x64_i2c:54: error: #error ("Height incorrect, please fix Adafruit_SSD1306.h!");
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
^
#error ("Height incorrect, please fix Adafruit_SSD1306.h!");

I uncommented the lines in the .h file and got tons of other errors.
Not sure why. I am not getting any sound out of the audioshield, I cant make the oled work.
I am an absolute Beginner but was very successful controling an adau 1701 dsp using an esp 32 with i2c so I am wondering why nothing seems to work on this unit.
Is there a general testprogram to see if the unit is ok?
Ohh and am I right that the Teensy 4.1 does not have a dac onboard????
 
Last edited:
Could you post your complete code? And perhaps a photo of your setup?

When I compile ssd1306_128x64_i2c.ino I do not get any error... Did you install/update the Adafruit library to the latest version [2.3.1] using the Arduino Library Manager?

Besides this, I see you are using the audioshield as well? In that case we better isolate the OLED problem from the rest of the hardware. First try to bring up the display exclusively and then integrate the other hardware parts piece by piece.

Paul
 
I think regardiung the audioboard I probably wrecked one of the conducting paths when unsoldering the pins I first soldered to the board (this is what happens when someone is not patient enough to read through the manual....).
The setup looks like this:
Mhmm can'T upload the imag, I suppose it is too large.
Maybe it just isn't my day today.
I am packing all together now and have a go at another day maybe.
Thanks for helping :)
 
Status
Not open for further replies.
Back
Top