The SparkFun TeensyView is a compact OLED display module that provides a high-contrast, readable display for embedded electronics projects. With its 128x32 pixel resolution, it is capable of displaying text, graphics, and animations. The display uses an I2C interface for communication, which simplifies the wiring and integration with microcontrollers like the Teensy and Arduino platforms. Common applications include user interfaces, data monitoring displays, and any project requiring a small yet clear visual output.
Pin Number | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (3.3V to 5V) |
3 | SDA | I2C Data Line |
4 | SCL | I2C Clock Line |
5 | RST | Reset pin (optional use) |
6 | D/C | Data/Command control pin (optional use) |
U8g2
library is recommended.#include <Wire.h>
#include <U8g2lib.h>
// Initialize the OLED display using the U8g2 library
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
void setup() {
// Begin communication with the display
u8g2.begin();
}
void loop() {
// Clear the buffer
u8g2.clearBuffer();
// Set the font and draw a string at position (0,22)
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.drawStr(0,22,"Hello, TeensyView!");
// Send the buffer to the display
u8g2.sendBuffer();
// Add a small delay
delay(1000);
}
Q: Can I use the TeensyView with a 5V microcontroller? A: Yes, the TeensyView can be used with both 3.3V and 5V systems. Ensure that the I2C logic levels are compatible.
Q: How do I update the display content? A: Use the display library's functions to clear the buffer, draw new content, and then send the buffer to the display.
Q: What should I do if the display is very dim? A: Check the power supply voltage and the contrast settings in your display library. Adjusting the contrast can improve display brightness.
Q: Can I use multiple TeensyViews on the same I2C bus? A: The TeensyView has a fixed I2C address, so you cannot use multiple displays with the same address on the same bus without additional hardware or software to change the address.