Arduino BT HC-06 Wront Data received

Okay, i got a new problem today.

Im sending the Time from my Android phone to the arduino, using the hc-06 bluetooth module. the app is taking the current time (unix) and sending it to the arduino.
well, when im sending the time (f. ex. 1419089194) the arduino receives (1419088896). and when im trying to send the time again, it stays at the same time.
Arduino Code:

#include <SoftwareSerial.h>
#include <Time.h>

time_t zeit;
SoftwareSerial mySerial( 5, 6); // RX, TX

void setup() {
  Serial.begin(9600);
  mySerial.begin(9600);
}
void loop() {
if(mySerial.available() >= 10) {
     zeit = 0;
     zeit = mySerial.parseFloat();
     mySerial.flush();
     Serial.println(zeit);
  }

}

AppInventor 2 Blocks:

What do i have to change?

Thanks for the help :slight_smile:

~Straw

Will the time ever be a float ?
I suspect that Serial.flush() is nor doing what you think
See Serial.flush()

Ok, removed the flush and changed it to parseInt, totally forgot that the app isnt sending the milliseconds anymore and now it works ^^

Thanks :slight_smile:

~Straw