[chronojump/michrolab] Minor change
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] Minor change
- Date: Thu, 9 Jun 2022 16:15:11 +0000 (UTC)
commit 50d87274a617aa8cfab151107e0194ff8da2d0ec
Author: xpadulles <x padulles gmail com>
Date: Thu Jun 9 18:14:54 2022 +0200
Minor change
arduino/michrolab/michrolab.ino | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/arduino/michrolab/michrolab.ino b/arduino/michrolab/michrolab.ino
index b7e02b95c..767c3d933 100644
--- a/arduino/michrolab/michrolab.ino
+++ b/arduino/michrolab/michrolab.ino
@@ -303,6 +303,19 @@ personType persons[100];
IntervalTimer rcaTimer;
void setup() {
+ //Attention: some SD cards fails to initalize after uploading the firmware
+ // See if the card is present and can be initialized:
+ //TODO. Open a dialog with advertising of this situation
+
+ while (!SD.begin(chipSelect))
+ {
+ Serial.println("Card failed, or not present");
+ tft.println("Card failed, or not present");
+ //delay(1000);
+ }
+ tft.println("Card initialized");
+ Serial.println("card initialized");
+
pinMode(redButtonPin, INPUT_PULLUP);
pinMode(blueButtonPin, INPUT_PULLUP);
@@ -357,19 +370,6 @@ void setup() {
tft.setRotation(3);
#endif
- // See if the card is present and can be initialized:
- //TODO. Open a dialog with advertising of this situation
- if (!SD.begin(chipSelect))
- {
- Serial.println("Card failed, or not present");
- tft.println("Card failed, or not present");
- delay(100);
- } else
- {
- tft.println("Card initialized");
- Serial.println("card initialized");
- }
-
dirName = createNewDir();
totalPersons = getTotalPerson();
readPersonsFile();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]