Skip to content

Commit

Permalink
Fixed model on SD for CI workflow pipeline compliance.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Mar 24, 2024
1 parent 070bb3a commit 9e04a6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/model_on_sd/model_on_sd.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include <diwa.h>
#include <SD.h>

// CS pin definition for SD card
#define SD_CS_PIN 5

// Function to train the neural network and save the trained model to a file
void trainAndSave() {
// Create a Diwa object
Expand Down Expand Up @@ -134,7 +137,7 @@ void setup() {
Serial.begin(115200);

// Initialize the SD card connected to ESP32 via SPI
if(!SD.begin()) {
if(!SD.begin(SD_CS_PIN)) {
Serial.println(F("Something went wrong initializing SD card."));
while(true);
}
Expand Down

0 comments on commit 9e04a6f

Please sign in to comment.