RobotikaWall
Add message
Add a new message
Title
Text
[code] #include "LearningKit.h" #include
void setup() { setupButtons(); Serial.begin(115200); Serial.println("Logging - start"); SPIFFS.begin(); File file = SPIFFS.open("/log.txt", FILE_WRITE); if (!file) { Serial.println("Failed to open file for appending"); return; } while(digitalRead(SW1) == true) { file.println(analogRead(PHOTO)); Serial.printf("data: %i\n", analogRead(PHOTO)); delay(100); } file.close(); Serial.println("Logging - stop"); file = SPIFFS.open("/log.txt"); if (!file) { Serial.println("Failed to open file for reading"); return; } Serial.println("Logging - read"); while (file.available()) { Serial.write(file.read()); } file.close(); } void loop() { } [/code]
Password
Save