The following is a very stripped down bit of code just to show what I need to get working on the esp.
This program works with the display on the micromite...
I2C OPEN 100,100 'OPEN I2C PORT
‘CONFIGURE DISPLAY
I2C WRITE &H70, 0, 1, &H21
I2C WRITE &H70, 0, 1, &H81
I2C WRITE &H70, 0, 1, &HEF
I2C WRITE &H70, 0, 2, &H00, &H06 ‘FIRST DIGIT
I2C WRITE &H70, 0, 2, &H02, &H5B ’SECOND DIGIT
I2C WRITE &H70, 0, 2, &H06, &H4F ‘THIRD DIGIT
I2C WRITE &H70, 0, 2, &H08, &H66 ’FORTH DIGIT
END
The four lines toward the end are sending 2 bytes each to the display to show a number on each digit. Again, this code does work.
This is what I converted it to for the esp and can not for the life of me figure out why it won't work... I do have 4.7k pull-ups on the gpio's and am using GPIO0 for SDA and GPIO2 for SCL.
memclear
address = 112 'HEX 70
i2c.begin(address)
i2c.write(33) ‘HEX 21
i2c.write(129) ’HEX 81
i2c.write(239) ‘HEX EF
i2c.end()
delay 10
i2c.begin(address) ’FIRST DIGIT
i2c.write(0)
i2c.write(6)
i2c.end()
delay 10
i2c.begin(address) ‘SECOND DIGIT
i2c.write(2)
i2c.write(90)
i2c.end()
delay 10
i2c.begin(address) ’THRID DIGIT
i2c.write(6)
i2c.write(79)
i2c.end()
delay 10
i2c.begin(address) ‘FORTH DIGIT
i2c.write(8)
i2c.write(102)
i2c.end()
delay 10
end