Code : Tout sélectionner
#include <SoftwareSerial.h>
#define startFrame 0x02
#define endFrame 0x03
SoftwareSerial* cptSerial;
void setup()
{
Serial.begin(115200);
cptSerial = new SoftwareSerial(8, 9);
cptSerial->begin(1200);
Serial.println(F("setup complete"));
}
void loop()
{
char charIn = 0;
while (charIn != startFrame)
{
charIn = cptSerial->read() & 0x7F;
}
while (charIn != endFrame)
{
if (cptSerial->available())
{
charIn = cptSerial->read()& 0x7F;
Serial.print(charIn);
}
}
Serial.println("");
}
Maintenant, je voudrais pouvoir le stocker sur la carte SD avec le micro card SD en .CSV
merci pour les réponses que vous pourrez m'apporter .