Re: SPI Slave with Arduino libs ?
Posted: Wed Jan 18, 2017 2:54 am
Vicne wrote:The first issue I had was that when booting the ESP with the generator already running, the SS (SPIO15) is high, causing the ESP to boot in a wrong mode. For the time being, I solved this by connecting the SS only after the ESP has booted. I'll make that automatic later on.
My use case is having the esp listen in on an existing SPI interface, acting as a slave in disguise. So i only want to read. I have the SPISlave example (https://github.com/esp8266/Arduino/tree/master/libraries/SPISlave) working part from the GPIO15 / SS pin issue. Any solution for this boot time / changing pin functionality? Can we use another GPIO as SS, or how do you guys manage?
- I only listen on the SPI as a slave, i never send.
- I need the solution to be Esp.Deepsleep() safe, since i'm gonna wake up every hour and get a reading, then sleep again.
- I really like the SPISlave approach, and rather use that than bit banging my own solution.
I've been trying to get a solution from http://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html, where they show for the ESP01 how to reuse GPIO 0 & 2 after boot time, but i can't figure out how to do it for GPIO 15. I've also found solutions using a NPN and a PNP transistor to manage this, but my electrical know-how is not enough to design that by myself.
Also, if there is a bit-banging solution for *reading*, can anyone point me in a direction to a implementation?
I'm just hoping someone else have solved the issue.
Thanks,
/Johan