Communicating with an ESP8266 as an SPI slave

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Posts: 221
Joined: Wed Apr 08, 2015 5:19 am

Communicating with an ESP8266 as an SPI slave

Post by SpotlightKid » Tue Mar 14, 2017 12:55 am

Today I managed to communicate via SPI between an STM32F4 board as the master and an ESP866 board as the slave, running an Arduino-for-ESP8266 sketch using the SPISlave library. ... /spimaster

My plan is to use this communication channel to use the ESP8266 as a wifi client for the STM32F4 board (or pyboards). I guess I will need to implement some kind of RPC-over-SPI protocol for that. Anybody know any existing solutions for this, which can be easily implemented in (Micro)Python and C(++)?

It may turn out to be easier to implement SPI slave support for MicroPython on the ESP8266, though. The code for the above mentioned SPISlave library isn't very complicated. It has an LGPL license though and contains a few Arduino-isms. I had a look at the HSPI implementation in the MicroPython esp8266 port, but my upy-extension-module-foo isn't quite up to the task yet.

User avatar
Posts: 1960
Joined: Fri Jul 18, 2014 8:01 am

Re: Communicating with an ESP8266 as an SPI slave

Post by pythoncoder » Wed Mar 15, 2017 4:46 pm

Good luck with this - it should be a very useful project.
Peter Hinch

Post Reply