Search found 73 matches

by warren
Fri Feb 03, 2017 4:04 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

@mcauser:

That works *perfectly*!

Thank you so much...
by warren
Wed Feb 01, 2017 9:47 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

Just to confirm, I have the 25AA512 running at 3.3 volts. There are two pullup resistors to +3.3v - one on scl and one on sda. i2c.scan() returns an address for the EEPROM (80) A write command does NOT return any error: >>> i2c.writeto_mem(0x50, 0, bytearray([104, 101, 108, 108, 111, 32])) >>> If I ...
by warren
Wed Feb 01, 2017 9:11 pm
Forum: ESP8266 boards
Topic: Problem with Multiple ESP8266 and MQTT. Blocked Sockets?
Replies: 19
Views: 6060

Re: Problem with Multiple ESP8266 and MQTT. Blocked Sockets?

This is only tangential to this specific thread, but I am learning that often with ESP units, lateral thinking can yield surprising results! I spent the best part of a week doing various tests with multiple ESP8266 units sharing a common MQTT server. The initial observations led me to believe that i...
by warren
Wed Feb 01, 2017 5:42 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

Warren, did you succeed ? Nope. I hit a brick wall and was considering getting another EEPROM to see if that was the issue...but now I read your post and the one from mikruth I see that there is probably an issue with the code... My goal is to store on eeprom a timestamp (unix) and a value from a s...
by warren
Tue Jan 17, 2017 10:26 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

Thanks for the extra info - helpful.. Was there a pause between writeto_mem() and readfrom_mem(). Yes, I was entering the lines manually and waited between write and read instructions. If I use the freq=50000 as in your code, it generates errors when reading. I had to reduce the freq to 20000 Does t...
by warren
Tue Jan 17, 2017 6:59 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

i2c.readfrom_mem + i2c.writeto_mem is what you are after. http://docs.micropython.org/en/latest/esp8266/library/machine.I2C.html >>> from machine import I2C, Pin >>> i2c = I2C(scl=Pin(5), sda=Pin(4), freq=50000) >>> i2c.scan() Read 11 bytes starting at memory address 0 >>> i2c.readfrom_mem(0x50, 0,...
by warren
Thu Jan 12, 2017 1:10 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

Re: I2C EEPROM on uPy/ESP8266?

If you just want to read/write data, the existing I2C lib works well. At least, I used that for a quick hack, and just followed the examples in the doc, believe it or not, here: http://docs.micropython.org/en/latest/esp8266/library/machine.I2C.html?highlight=i2c and here: http://docs.micropython.or...
by warren
Tue Jan 10, 2017 11:32 am
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12876

I2C EEPROM on uPy/ESP8266?

Hi,

I want to add an i2c EEPROM to an ESP sensors - is there any existing code / library available that I can use/modify?

Thanks
by warren
Thu Dec 22, 2016 3:24 pm
Forum: ESP8266 boards
Topic: WDT
Replies: 4
Views: 2109

Re: WDT

sleepTime() is a function that puts the device to deepsleep. But the device executes the callback and goes into deepsleep as soon as it starts. [Sorry if some of this strikes you as basic, but I try to reply in a way that less experienced folks can also benefit from...this is what really helped me ...
by warren
Wed Dec 21, 2016 5:38 am
Forum: ESP8266 boards
Topic: WDT
Replies: 4
Views: 2109

Re: WDT

Is there another way to set a timeout, or any documentation on how to use the WDT? Thanks... I decided to use a custom WDT using interrupts. I got more flexibility for my specific application. It is not as robust as a machine based WDT, but in my experience with several different projects, it is pe...