Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Suroh
#40781 That idea sounds great! I was already wondering whether there was another solution to my problem :D
I have not yet worked with I2C, which pins would that need? Does it work the same way the Arduino Uno uses I2C?

I'm still new, as you can tell :lol:
User avatar
By Barnabybear
#40784
Suroh wrote:That idea sounds great! I was already wondering whether there was another solution to my problem :D
I have not yet worked with I2C, which pins would that need? Does it work the same way the Arduino Uno uses I2C?

I'm still new, as you can tell :lol:

The best way is to use GPIO 0 & GPIO 2. I2C needs 10k pull up resistors on the lines and those two GPIOs need 10k pull ups for boot. Never used it on an Arduino but it looks the same.
I'll post more later, but basicaly:
Code: Select all#include <Wire.h>
#define SLAVE_ADDRESS 0x40 // address of I2C device.
void setup() {
}
void loop() {
Wire.beginTransmission(SLAVE_ADDRESS);
Wire.write(data);
Wire.write(more data);
Wire.write(even more data);
Wire.endTransmission();
}
User avatar
By Suroh
#40814 Thx @GregryCM for the schematic! I think i understand it, besides that part named J4, which is connected to SCL, SDA and GND. What is this part and what does it do?