I’ve got the data logging board with the ESP32 processor board slotted in. I’m trying to use the SD card but am not having success. The example uses the Artemis processor and the schematic is fairly obvious as to what pins to use, however the ESP32 is not obvious. Can anyone point me in the right direction? I’m not sure if it is relevant but the errors I get are :-
E (29) gpio: GPIO can only be used as input mode
E (30) gpio: gpio_set_level(226): GPIO output gpio_num error
E (30) gpio: gpio_set_level(226): GPIO output gpio_num error
E (34) gpio: gpio_set_level(226): GPIO output gpio_num error
E (538) gpio: gpio_set_level(226): GPIO output gpio_num error
E (538) gpio: gpio_set_level(226): GPIO output gpio_num error
E (1038) gpio: gpio_set_level(226): GPIO output gpio_num error
I am also using the Expressif SD library too.
On another note, why does is the upload so large compared to say the Artemis processor?
The thing is the SD card is built into the data logging board so there are no pins to connect. The demo code for the artemis processor has
#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
const int chipSelect = 23; // The CS pin is DATA3 or 23 for the MicroMod Artemis Processor. Adjust for your processor if necessary.
What I can’t find is what the CS pin is. I’ve tried pin 30 Flash SCS and 29 Data3 etc. and cannot get it to work. I keep getting things like
entry 0x400805f0
E (29) gpio: gpio_set_level(226): GPIO output gpio_num error
E (29) gpio: gpio_set_level(226): GPIO output gpio_num error
E (30) gpio: gpio_set_level(226): GPIO output gpio_num error
E (533) gpio: gpio_set_level(226): GPIO output gpio_num error
E (533) gpio: gpio_set_level(226): GPIO output gpio_num error
E (1033) gpio: gpio_set_level(226): GPIO output gpio_num error
Card failed, or not present
I’m going to try the Artemis processor and see if it is actually working.
I’ve just tried the Artemis processor instead and tok the code for the SD from the logging board demo program as below
#include <SPI.h>
#include <SD.h>
const int chipSelect = 23; // The CS pin is DATA3 or 23 for the MicroMod Artemis Processor. Adjust for your processor if necessary.
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
while (1);
}
Serial.println("card initialized.");
}
void loop() {
// put your main code here, to run repeatedly:
while(1);
}
It didn’t work and just printed the card failed message. I’ve also tried two different SD cards with different sizes so are there any more tests I can do on the board to check if the SD slot is OK or not? The SD slots are part of the board so you should only need the CS pin.