I'm building a weather data collector and I want to be able to dump that weather data somewhere. I've considered the options, and since I'm going to be storing a fairly small amount of data (in the megabyte range) I don't want to use SD cards (also SD cards are expensive). I've heard of use of NAND flash memory chips (like the W25Q32), and I was hoping that I could possibly interact with them in a simple way (since most ways require writing to each individual address). Is there possibly a way to build a file system within one of these small flash memory chips and interact with them as simply as interacting with an SD card?
TLDR: I want to interact with a flash memory chip easily to store basic ASCII data
-
While you can put a filesystem on an SPI flash, it's generally a bad idea, as many filesystem map poorly to the block-erase nature of NOR flash, and filesystem APIs don't well represent access carefully tuned to the needs of flash. If you do, use a fileystem optimized for flash. Probably better and simpler though to organize your writes as a linear journal of data.Chris Stratton– Chris Stratton2017年03月16日 04:20:25 +00:00Commented Mar 16, 2017 at 4:20
-
Could you set up a server with a simple web application, put a WiFi module on the Arduino, and have it store data in a database? Could use apache or IIS if your on windows. set it up to run PHP. Set up a MySQL database. Have a page that accepts GET variables of the data and insert it into the database. You could set up another page to access/search/analyze the data.rpmerf– rpmerf2017年03月16日 10:54:08 +00:00Commented Mar 16, 2017 at 10:54
-
@rpmerf I've done this before, but it consumes FAR too much power and I plan to put these small weather data collectors in places away from infrastructure.Carrot M– Carrot M2017年03月16日 19:08:11 +00:00Commented Mar 16, 2017 at 19:08
-
Why not use the raw device commands and write blocks? Does your sketch really need a file system, i.e. more than a few files?Mikael Patel– Mikael Patel2017年03月16日 19:47:20 +00:00Commented Mar 16, 2017 at 19:47
-
There are a few Arduino boards out there that have RTC, SPI Flash and RF-modules, and are real low power design. See for instance Anarduino anarduino.com/miniwireless, or Moteino lowpowerlab.com/guide/moteino.Mikael Patel– Mikael Patel2017年03月16日 19:52:23 +00:00Commented Mar 16, 2017 at 19:52
3 Answers 3
This lib offers a means of reading and writing ASCII arrays to flash devices. This would be a simple solution for such a data logger requirements. It's ASCII orientated.
I don't think you need a file system: that is usually needed when you want to manage many files. Your weather data log sounds like a single file.
What you seem to need is to access EEPROM as a stream, exactly like you would for an open file. There are stream wrappers around some EEPROM libraries, e.g. this one for ESP. I suggest you check it out and see if you can adapt it to the EEPROM library you use.
There is a way to do this. Using a 2ドル adaptor from eBay, you can hook it up to a micro sd card. An sad card for 4ドル can store 128mb of data, which is plenty for you.
-
4This does not answer the question which was asked. The poster already seems familiar with what you propose, and is seeking to do something else.Chris Stratton– Chris Stratton2017年03月16日 23:17:52 +00:00Commented Mar 16, 2017 at 23:17