[Microbit-Python] SPI APIs on BBC micro:bit and ESP8266

Radomir Dopieralski microbit at sheep.art.pl
Mon Nov 21 05:01:17 EST 2016


On Mon, 21 Nov 2016 10:53:36 +0100
"M.-A. Lemburg" <mal at egenix.com> wrote:

> Since both devices were running in SPI master mode, we simply
> crossed the MISO and MOSI cables, connecting MISO on the
> ESP to MOSI on the MB and vice-versa. We also pulled down
> the chip select pin on the ESP to GND using a 4.7k resistor.
> The MB doesn't expose this pin.

This won't work. If you do that, each of the boards will completely
ignore the other board's clock, and just spew data at its own pace.
It may (unreliably) work when using two identical boards, as they are
likely to have similar clocks, however, even that will go out of sync
eventually. With completely different boards, such as the Micro:bit and
the ESP8266, and with the clock speeds set with limited precision (the
prescaler for the clock has only so much resolution), you are very
unlikely to get any synchronisation at all.

You could try using NodeMCU on the ESP8266, it has an I2C slave
implemented.

-- 
Radomir Dopieralski


More information about the Microbit mailing list