I have a project with several grove sensor modules.
It has :
- Seeduino v4.2
- Grove base hat V2
- Oled display v1.2. I2c
- Precision Rtc i2c
- Temp/humi/pressure/gas sensor BME680 i2c
- Dust sensor HM3301 I2C
- Blue LED
- SD card v4 with a 32 Gb SDHC card
I got 1 - 7 all working in code before adding 8. The SD card is mounted on top of the seeduino, and base hat is sitting on top so I can access the 4 x I2c connectors and 1 digital port.
I need the SD card to record data readings from the sensors. It is essential.
When I added example code for the SD Card I got an “out of memory” error from the compiler. Global variables not leaving enough space for local variables.
Clearly the 2K of memory isn’t enough, probably because SD Card needs to read the card, volume and FAT into (global) heap memory. This ought to be documented.
If you try to run the SD card on Uno/seeduino v4.2 then you won’t have much memory for anything else. It uses 1.2kbytes of ram out of 2k available on the heap.
So I need more memory …
Looking at available options, it seems like a Seeduino Mega 2560 with 8K of RAM might be better.
According to wiki documentation my base hat v2 is compatible with seeeduino mega. I don’t know how it does that, since i2c pinouts are different…
If its true then I don’t need to change anything else. Just plug in the Mega board in place of the seeduino v4.2 board. Is it true ?
Questions:
-
Please can you doubly confirm that all 4 i2c connectors on base hat v2 will work on seeduino mega 2560 without extra wiring.
-
Is there a base hat for Mega 2560 that has more than 3 x i2C connectors ?
-Can the SD card v4 work thru I2C interface ?
-Does the SD card v4 support 32 GB sdhc cards or not ? ( documentation is inconsistent )
Thanks for reading.
Can you help ?
(I made corrections to this post after checking compatibility of base shield v2 in wiki documentation. A lot of my questions disappeared …)