-->
Page 1 of 2

I2C would be awesome!

PostPosted: Tue Oct 27, 2015 2:13 pm
by viscomjim
Do you have any plans to implement I2C in MMISCOOL basic? This would be good for expanding I/O, using displays, and many other things.

Thanks for this firmware! AWESOME!

Re: I2C would be awesome!

PostPosted: Tue Oct 27, 2015 7:15 pm
by Mmiscool
Instant wish fulfillment mode on. :D

I had added I2C function some time ago but have not documented them yet.

Still need to do that but don't really have any i2c devices to test with.


Basic function = arduino function
    i2c.begin(address as number) = Wire.beginTransmission(address as number);
    i2c.write(stringToWrite) = Wire.write(StringToWrite);
    2c.end() = Wire.endTransmission();
    i2c.requestfrom(addressAsNumber,numberOfCharacters) = Wire.requestFrom(Address,NoOfBytes);
    i2c.available() = Wire.available());
    i2c.read() = Wire.read();


Keep in mind these have not been tested.

I2c is set on pins 0 and 2

Arduino docs for i2c functions is at the following link.
https://www.arduino.cc/en/Reference/Wire/

Re: I2C would be awesome!

PostPosted: Thu Oct 29, 2015 12:40 am
by viscomjim
Pin 0 = clk
pin 2 = dat

or vise versa?

Thanks, will try I2C as soon as board shows up.

Re: I2C would be awesome!

PostPosted: Thu Oct 29, 2015 6:20 am
by cwilt
Also, what are you calling pin 0 and 2?

I have seen many different IO numbering methods used for esp8266 in the past. Can you provide a link to the pinout your are using?