Chat freely about anything...

User avatar
By lozi_dani
#46430 Hi everybody.

I am looking for information about how can I configure this module as slave if an i2c port. I want to control two peripherals, a camera and this module, controlled using a 18f4550 pic. The camera is able to be set as slave, but I don't know if this could be possible with esp-01. The 18f4550 will be the master.


Thanks for any help
User avatar
By martinayotte
#46474 The I2C on ESPs is Software bit-banged, so, it is Master-Only !
To have a Slave implementation, there will be tough issues about interrupt timing.
Rather easier to attach a small external MCU, such ATTiny85, linked to serial port, and ATTiny will be the Slave I2C.

EDIT : Interestingly, maybe Rudi has done the challenge of Software-Slave, I've suggested him to share his code :
http://www.bbs.espressif.com/viewtopic. ... 6675#p6675
User avatar
By lozi_dani
#46482 Understood! And what if I want to use a WiFi module as slave, to have all the control in my microcontroller? There is some WiFi module which I can do this?

My project will do the next:

Microcontroller (Master)
Camera (Slave)
WiFi (Slave)

Microcontroller ask to the camera for an image.
Microcontroller treat the image.
Microcontroller send the treated image through the WiFi module.

So the microcontroller is the component that decides with which slave want to communicate.

There is some WiFi module in the market which can I program as a slave? Or maybe someone has any suggestion to achieve this communication between my microcontroller and both peripherals?

*Note: The microcontroller is a PIC24 from Microchip.

Thank for your help and reply! YOu helped me very much!