M.V.
Published © MIT

Large Fonts for OLED 128x32 Driven by ATTiny85

You want to attach the DigiSpark ATtiny85 to a tiny OLED (128x32 pixels) and make it use easily readable, huge fonts (16x32 pixels WxH)?

EasyShowcase (no instructions)1 hour662
Large Fonts for OLED 128x32 Driven by ATTiny85

Things used in this project

Hardware components

DigiSpark
DigiSpark
×1
Pmod OLED
Digilent Pmod OLED
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Attiny85 oled 1ezlxjim8l

Code

Arduino Code

Arduino
This is an example showing the use of digits and a few useful characters like , - . / and :
In this way a normal display of real numbers is possible.
/* Digispark ATtiny85 to small OLED 128x32 by I2C
 *  https://github.com/datacute/Tiny4kOLED 
 *  Tiny4kOLED.h: SSD1306xLED-Drivers for OLED 128x32 displays
 * @created: 2014-08-12  @author: Neven Boyanov
 * Source code available at: https://bitbucket.org/tinusaur/ssd1306xled
 * @ modified for 16x32 fonts: 2017-01-12 @author: M. V. Predoi 
 * Fits into Digispark  ATtiny85 (6012 bytes). 52 bytes of dynamic memory.
 *  ATtiny85   OLED
 *    <<------>>
 *  PB0        SDA
 *  PB2        SCL
 *  5V         VCC
 *  GND        GND
 *  
 */

#include <Tiny4kOLED.h>
#include <TinyWireM.h>
// ============================================================================

void setup() {
  oled.begin();
  oled.clear();
  oled.on();
}

void loop() {
  oled.clear(); //all black
  oled.setFont(FONT16X32); // 1 raw of 8 characters exactly fills 128x32
   //next line: oled.setCursor(X IN PIXELS, Y - NO EFFECT since 32 bits is max height);
  oled.setCursor(0, 0);
  oled.print(F("-23.56:/")); //wrap strings in F() to save RAM!
  delay(5000);    // To see the display "refresh"
}

Credits

M.V.

M.V.

3 projects • 3 followers
Arduino projects are a hobby for me.
Contact

Comments

Add projectSign up / Login