https://www.aliexpress.com/item/1005006011203112.html?spm=a2g0o.order_list.order_list_main.5.18751802e0f4RR got one of thesehave been trying for ages to get the adafruit lib to work but it wont using the standard examples but no luck. i know the screen works as it came preloaded with image from factory
Welcome to the forum
Please post the sketch, using code tags when you do, and explain what happens when you run it
Stab in the dark but...do you have the CH340 drivers installed.
Can't get it to work covers a LOT of territory.
should be i can get serial to and back from the board serial monitor works just fine, yeah i know cant get to to work is broad but i dont know how to be much more specific. only guess it has something to do with the sda and scl pins that i cant figure out how to redefine
See post #2
Which Adafruit library are you using for the display?
Have you run an I2C scanner to verify the address of the display? Generally it can be either 0x3C or 0x3D.
cant find any of those adresses so im thinking it has to do with the worng pins being selected but i cant figure out how to convince it to change the pins for sda and scl
the program also tells me to use 0x3D for 64 tall displays
That address is specific to the displays that Adafruit sells, any other source can be either address.
Please post your test code. The description of the board indicates it is using the default I2C pins for the ESP8266, and the board is a NodeMCU.
heres the testprogram
#include <Adafruit_I2CDevice.h>
Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x3D);
void setup() {
Serial.begin(9600);
Serial.println("test");
while (!Serial) { delay(10); }
Serial.println("I2C address detection test");
if (!i2c_dev.begin()) {
Serial.print("Did not find device at 0x");
Serial.println(i2c_dev.address(), HEX);
while (1);
}
Serial.print("Device found on address 0x");
Serial.println(i2c_dev.address(), HEX);
}
void loop() {
}
@boomking99
Put #include <Wire.h> at the beginning of the sketch
EDIT: At the beginning of setup() put Wire.begin(6, 5);
For some reason, the Wire library does not have the I2C scanner example sketch on the ESP8266. Here is the code used for other platforms, see if it will find anything on your board.
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
// by Arduino.cc user Krodal.
// Changes by louarnold removed.
// Scanning addresses changed from 0...127 to 1...119,
// according to the i2c scanner by Nick Gammon
// https://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
// As version 4, but address scans now to 127.
// A sensor seems to use address 120.
// Version 6, November 27, 2015.
// Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(9600);
while (!Serial); // Leonardo: wait for Serial Monitor
Serial.println("\nI2C Scanner");
}
void loop() {
int nDevices = 0;
Serial.println("Scanning...");
for (byte address = 1; address < 127; ++address) {
// The i2c_scanner uses the return value of
// the Wire.endTransmission to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
byte error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
if (address < 16) {
Serial.print("0");
}
Serial.print(address, HEX);
Serial.println(" !");
++nDevices;
} else if (error == 4) {
Serial.print("Unknown error at address 0x");
if (address < 16) {
Serial.print("0");
}
Serial.println(address, HEX);
}
}
if (nDevices == 0) {
Serial.println("No I2C devices found\n");
} else {
Serial.println("done\n");
}
delay(5000); // Wait 5 seconds for next scan
}
that just crashes the entire thing it keeps rebooting when that line is reached
I did edit my post (i originally had 4, 5) should be (6,5)
According to the documentation on the webpage SDA is (D6/GPIO14) and SCL is (D5/GPIO12) pins.
yeah i use (6,5) still keeps rebooting
Hi, @boomking99
Welcome to the forum.
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
What model Arduino are you using?
What does the IDE monitor screen display when you run the code?
You should get some message from the controller.
Thanks.. Tom..
https://www.aliexpress.com/item/1005006011203112.html?spm=a2g0o.order_list.order_list_main.5.18751802e0f4RR
mocro usb version the serial monitor posts garbage on boot but after that its normal and when i run Wire.begin(6,5); it reboots. Also i know the screen works as it came preloaded with a program like the link which worked
Did you try the code @david_2018 posted but with Wire.begin(6, 5); in setup
yes i did keeps rebooting
Some basic questions:
Have you installed the ESP8266 core for Arduino?
Which board do you select when you compile?