I followed the example here https://en.docs.sensebox.de/blockly/blockly-sd/ to log CO2 data to an SD Bee. However, I don’t get any data. The SD card is a 64GB FAT formatted.
code is here
#include <SPI.h>
#include <SD.h>
#include "SparkFun_SCD30_Arduino_Library.h"
#include "SenseBoxMCU.h"
int co2;
File dataFiledata;
SCD30 airSensor;
void setup() {
SD.begin(28);
dataFiledata = SD.open("data.txt", FILE_WRITE);
dataFiledata.close();
Wire.begin();
if (airSensor.begin() == false)
{
while (1)
;
}
co2 = (int)(airSensor.getCO2());
}
void loop() {
dataFiledata = SD.open("data.txt", FILE_WRITE);
dataFiledata.println(co2);
dataFiledata.close();
}