The use of the ESP8266 in the world of IoT

User avatar
By rab
#15461 When I started playing with the esp8266 I couldn't find a lot of good C code examples (but quite a bit of LUA, which doesn't interest me). As a result I've written what I think are fairly decent drivers for the DS3231 & DS1307 RTCs using the C API, for use and for my learning. I hope they may be of use to others. They've had a good test, but please do report any bugs you might find.

http://richard.burtons.org/2015/04/23/r ... e-esp8266/

Richard.
User avatar
By Baltasar
#25673 Hi Richard do you have some real examples using the RTC's, do I need to use something like wire lib to comunicate and use your driver?

I'm creating a timer for switching RGB lighs in certain hours so I need the RTC and also some way of storing the vars on the RTC Eprom module.

Thanks.
User avatar
By rab
#25689 No extra libs needed. Just include i2c_master.h & .c from the sdk and set the right pins for I2C at the top of the header file. Then call i2c_master_gpio_init(); from your user_init function and you're good to go. You can then call the time or eeprom function to get/set time and read/write data to your heart's content.