electrical-pro / ds_fake_tester Goto Github PK
View Code? Open in Web Editor NEWDS18B20 Fake tester sketch
DS18B20 Fake tester sketch
Hi there!
Need a little help wit SSD1306 (0x3C) display.
Getting no picture with your code.
This code works from arduino ide example:
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
Serial.begin(9600);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
display.clearDisplay();
textexample();
}
void loop() {
}
void textexample(void) {
display.clearDisplay();
display.setCursor(0,0);
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.println("Start");
display.display();
delay(2000);
display.setCursor(50,27);
display.println("Middle");
display.display();
delay(2000);
display.setCursor(100,55);
display.println("End");
display.display();
delay(2000);
display.setCursor(0,55);
display.println("bottom left");
display.display();
delay(2000);
display.setCursor(72,0);
display.println("top right");
display.display();
}
Tried to spot the differences in your code, the only one I chandeg is display.setTextColor(SSD1306_WHITE);
instead display.setTextColor(WHITE);
...without luck :/
wich version of adafruit SSD1306 library did you use to compile the code?
Can you help me?
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.