loading
8 Comments

Tell us about yourself!

Complete Your Profile
  • ATTiny85 connects to I2C OLED display - Great Things Can be Small

    This works for me :D#include // I2C Master lib for ATTinys which use USI - comment this out to use with standard arduinos#include // needed to up clock to 16 MHz on 5v Trinket#include dht DHT;const byte DHT22_Pin = 1;const int analogInPin = 3;#include "SSD1306_minimal.h"#include #define DEG "\xa7" "C"SSD1306_Mini oled;char strHum[5];char strTemp[5];char strSensorValue[5];// Struct for sending measured data/*struct Data { uint16_t temp; // Temperature value uint16_t hum; // Humidity value int status; // DHT22 module status} data;*/void setup(){ if (F_CPU == 16000000) clock_prescale_set(clock_div_1); // 5V Trinket: run at 16 MHz TinyWireM.begin(); // initialize I2C lib - comment this out to use with stand...see more »This works for me :D#include // I2C Master lib for ATTinys which use USI - comment this out to use with standard arduinos#include // needed to up clock to 16 MHz on 5v Trinket#include dht DHT;const byte DHT22_Pin = 1;const int analogInPin = 3;#include "SSD1306_minimal.h"#include #define DEG "\xa7" "C"SSD1306_Mini oled;char strHum[5];char strTemp[5];char strSensorValue[5];// Struct for sending measured data/*struct Data { uint16_t temp; // Temperature value uint16_t hum; // Humidity value int status; // DHT22 module status} data;*/void setup(){ if (F_CPU == 16000000) clock_prescale_set(clock_div_1); // 5V Trinket: run at 16 MHz TinyWireM.begin(); // initialize I2C lib - comment this out to use with standard arduinos oled.init(0x3c); oled.clear();}void loop(){ /* sensorValue = analogRead(analogInPin); data.status = DHT.read22(DHT22_Pin); data.hum = (int)DHT.temperature; data.temp = (int)DHT.humidity; */int chk = DHT.read22(DHT22_Pin);int h=DHT.humidity;int t=DHT.temperature;int sensorValue = analogRead(analogInPin); oled.startScreen(); oled.cursorTo(0,0); oled.printString( "Luftfeuchte: "); oled.startScreen(); oled.cursorTo(86,0); oled.printString( itoa(h, strHum, 10)); oled.startScreen(); oled.cursorTo(0,18); oled.printString("Temperatur: "); oled.startScreen(); oled.cursorTo(100,18); oled.printString( itoa(t, strTemp, 10)); oled.startScreen(); oled.cursorTo(0,36); oled.printString("Licht: "); oled.startScreen(); oled.cursorTo(51,36); oled.printString( itoa(sensorValue, strSensorValue, 10)); delay(500);}

    View Instructable »
  • ATTiny85 connects to I2C OLED display - Great Things Can be Small

    Can u send me the code you used? with librabry?the code below gives me the error.

    Can u send me the code you used? with librabry?the code below gives me the error.

    Can u send me the code you used? with librabry?the code below gives me the error.

    Hi!! i am trying to get the wheaterstation working.This is my code i adapt it to my needs..http://cloudkemi.at/owncloud/index.php/s/GO6BwICL6...FINAL_OLED.ino: In function 'void loop()':FINAL_OLED.ino:58:23: error: no matching function for call to 'SSD1306_Mini::printString(float&)'FINAL_OLED.ino:58:23: note: candidate is:In file included from FINAL_OLED.ino:7:0:C:\Users\kemi\Documents\Arduino\libraries\ATTiny85_OLED_weather_demo/SSD1306_minimal.h:130:10: note: void SSD1306_Mini::printString(char*) void printString( char * pText ); ^C:\Users\kemi\Documents\Arduino\libraries\ATTiny85_OLED_weather_demo/SSD1306_minimal.h:130:10: note: no known conversion for argument 1 from 'float' to 'char*'no matching function for call to 'SSD1306_Mini::printString(float&)'

    View Instructable »
  • ChristianK35 commented on 陳亮's instructable ATtiny Watch Core11 months ago
    ATtiny Watch Core

    Solved! i use this code:#include "SSD1306_minimal.h"#include <avr/pgmspace.h>#define DEG "\xa7" "C"SSD1306_Mini oled;void setup(){ oled.init(0x3c); oled.clear(); delay(1000);} void loop(){ oled.startScreen(); oled.cursorTo(15,1); oled.printString( "Oled_Attiny85"); }

    Hi i want to make an weather station with an dht22 sensor and this oled display and the attiny, everithing works grat with an 20x4 display lcdi just need the code to print some text how i use the command oled.print_digits("some text"); ?

    View Instructable »