Hooking up Metro Mini and ESP8622 Breakout via I2C

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MichaelScholz
 
Posts: 15
Joined: Mon Jul 30, 2018 8:20 pm

Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by MichaelScholz »

Hi,

I'm doing a project where I want to add network capabilities to my metro mini based 'system'. All that's left to do is adding a WiFi module to, for example, send a NTP request.

I got myself the https://learn.adafruit.com/adafruit-huz ... t?view=all module and wanted to hook it up via I2C to use it as a gateway to the network.

To develop my source code I'm using the Arduino IDE out of the box. I've been using the ESP8266 breakout board in an unmodified form since I have got it in Fall 2017.

All sketches, however, that I could find practically go from using the esp8266 breakout board as a stand alone micro controller unit where I would have to put my little programs on. But I just want to use this as a network 'interface card' for my metro mini using I2C.

So far I only found examples (here or on google) for a) (as said) using the esp8266-breakout board as the central MCU or b) interfacing this module using the serial interface.

How do I use this ESP8266 module as an I2C peripheral to my Arduino / metro mini? Maybe this is the wrong approach but I have come to the point where I just want to add a WiFi module to my metro mini and where restructuring to make the whole thing an esp8266-breakout-board-centered solution is not an option.


Thanks,

Michael

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by adafruit_support_mike »

I don't know of any existing code that uses the ESP8266 as an I2C slave.

The ESP8266's ROM firmware uses a Serial interface and AT- commands to communicate with other microcontrollers, so that's the native connection. It can also be a lot faster than a 400kHz I2C connection.

User avatar
MichaelScholz
 
Posts: 15
Joined: Mon Jul 30, 2018 8:20 pm

Re: Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by MichaelScholz »

Okay, understood. Thank you. -- Is the ESP8266 example 'webclient' code to use with the metro mini and should work out of the box once we established a serial connection?


Thanks,

Michael

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by adafruit_support_mike »

The code in the ESP8266 library is for the ESP8266 microcontroller itself.

For information about using it as a peripheral through the AT-command interface, the best source of information will probably be http://esp8266.com/

User avatar
MichaelScholz
 
Posts: 15
Joined: Mon Jul 30, 2018 8:20 pm

Re: Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by MichaelScholz »

Alright, from what I found over there the ESP8266 breakout board is not what I was looking for. It's more like an MCU solution itself and using it as a bridge between Arduino (where I have built my project around) and the WiFi is not gonna work as effortlessly as I thought. Bummer. I was rather looking for some kind of 'WiFi Shield' in the ESP8266 breakout board form factor that can easily be hooked up to the Arduino using either I2C or UART communication to get access to the internet. The metro mini's SPI is already taken for the sake of talking to an OLED display (the 1.5" SSD1351) so I can't use SparkFun's CC3000 based WiFi module (unless I rework parts of my design). Looks like I'm doomed and there is no chance to get this all in one circuit unless I rip everything apart and start from scratch based on either the ESP8266 as the core processor or making the SPI control more complex (slave selects). Dang.

Or is there anything else that I might have missed?


Thanks,

Michael

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hooking up Metro Mini and ESP8622 Breakout via I2C

Post by adafruit_support_mike »

You aren't likely to find an I2C-based Wifi interface anywhere. I2C is limited to about 100kHz by default because the pull-up resistors can't make the lines go high and low faster than that.

SPI is designed to be shared among multiple devices though. Each pin has its own CS signal (Chip Select) that tells it to pay attention to what's happening on the MOSI and SCK pins, and to transmit data on MISO. Only the device whose CS pin is pulled low talks to the microcontroller at any given time. You can connect the CS signals to GPIO pins and swap between devices as much as you want though.

We carry the WINC1500 breakout for WiFi, since that's a more recent chip than the CC3000:

https://www.adafruit.com/?q=WINC1500

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”