Hash a txt file using arduino
Posted: Tue Jun 25, 2013 8:29 pm
i want to hash a txt file using arduino, im doing a somekind of data logging project,,,, please help me to do that,,,, thanks
Code: Select all
void loop()
{
bool newdata = false;
unsigned long start = millis();
// Every second we print an update
while (millis() - start < 1000)
{
if (feedgps())
newdata = true;
}
gpsdump(gps);
//Write the newest information to the SD Card
dataString = SD_date_time + "," + SD_lat + "," + SD_lon;
if(SD_date_time != "invalid")
digitalWrite(LED, HIGH);
else
digitalWrite(LED, LOW);
//Open the Data CSV File
File dataFile = SD.open("LOG.csv", FILE_WRITE);
if (dataFile)
{
dataFile.println(dataString);
Serial.println(dataString);
dataFile.close();
}
else
{
Serial.println("\nCouldn't open the log file!");
}
}
Code: Select all
dataString = SD_date_time + "," + SD_lat + "," + SD_lon;
String hash = hash_algo(dataString);
dataString = dataString + " " + hash ;
As per the product description, the SD card interface board is interfaced to Arduino over SPI port.i use icsp interface to connect my sd card module