-->
Page 2 of 3

Re: ESP01 with 3 Pinouts needed

PostPosted: Tue Feb 09, 2016 7:47 am
by Suroh
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:

Re: ESP01 with 3 Pinouts needed

PostPosted: Tue Feb 09, 2016 9:20 am
by Barnabybear
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();
}

Re: ESP01 with 3 Pinouts needed

PostPosted: Tue Feb 09, 2016 9:54 am
by GregryCM
Suroh,

This post includes schematic of 4-bit I2C expander and ESP-01.
http://www.esp8266.com/viewtopic.php?p=28533#p28533

Greg

Re: ESP01 with 3 Pinouts needed

PostPosted: Tue Feb 09, 2016 1:53 pm
by Suroh
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?