Background I recently had a request from a customer about whether WSN nodes could save data if a gateway failed. I was aware of the flash available on board and got to work on a possible solution. This is a solution that I came up with (by no means the only way). I would emphasis a couple of caveats before we start: If you read the WSN node manuals the official advice is that the flash on board not be used to buffer data. This is because every time you write to the flash it requires an erase and you only have a finite number of erases. With this in mind: I have designed this to only log when the network is lost. I have added the ability to check the current levels. I would only use this when you really need it, you will limit the life of your nodes but obviously this is a calcuation you need to make. Additionally you could alter the firmware to change the rate at which you log to extend the life. This does require the WSN module and p...