Things used in this project

Hardware components:
Screen%20shot%202016 08 24%20at%205.31.19%20pm
DigiSpark
×1
Pmod oled  17060.1456867080.1280.1280
Digilent Pmod OLED
×1
Software apps and online services:
Ide web
Arduino IDE

Schematics

Schematic
Attiny85 oled 1ezlxjim8l

Code

Arduino CodeArduino
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

D3bc536bb453156a397c33bed4b9638b
Mihai Valentin
1 project • 1 follower
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login