Has anybody linked the imp up to an SD card or a memory stick to log data in case the wifi connection gets interrupted? What hardware did you use and where did you get it from? Did you need to write your own SD-card read/write driver in Squirrel?
You can use an Arduino to connect to an Imp.
You also can use the Impserver to store data with
Thanks for that!
I had a look on the website and found an interesting breakout board here:
for an MMC card which also includes sample code in C for interfacing in one of its links.
Another set of instructions is here:
For breakout boards with normal SD card sockets:
Due to very restricted space I was trying to avoid using the Arduino and, if possible, connect the imp directly to the card reader. I guess it will be a case of looking at the existing examples for drivers for SD card readers/writers and translating that into Squirrel - I haven’t looked yet, but I can imagine that to be a lengthy task.
Has anybody done this already?
One question to the imp team - there was talk about a revised version of the imp that would keep the imp functioning even when Wifi is lost, with an expected date of release sometime in February. Could you update me on the progress on that front?
The wifi off functionality is almost done - we should be branching for release in the next few days I hope, though we are planning to merge the latest Broadcom driver too.
I’d hope that this will be in a customer release in the next couple of weeks. The semantics were a little tricker than we’d originally thought but we believe the new API will be flexible enough for most uses.
If you manage to get a sd card running, please let us know how
Logging raw data to an SD card using SPI mode is fairly easy. A few years ago I designed a seismic recorder that logged directly to an SD card, using a simple hardware state-machine, no microprocessor at all. You can find the design here. The states are quite simple to follow, and should translate into squirrel without much effort.
I am planning to use the SPI interface to write to the SD card. The imp can do SPI (either SPI189 via pins 1,8,9 or SPI257 via pins 2,5 or 7).
The SD card SPI interface requires not 3, but 4 lines!
The imp features pins for MISO, MOSI and Clock. An SD card in SPI mode requires also an inverted SS (slave select) line, which needs to be asserted when SPI commands are sent and deasserted at the end of the transaction.
There goes another of my valuable ADC lines…