Go Down

Topic: Gobetwino Freezing (Read 1 time) previous topic - next topic

stevenir

Hi!

I am trying to use Gobetwino to collect the time from my computer and attach it to data from my Arduino.  I am trying to synchronize it with other data timestamped from my computer, so I do not wish to use an RTC.

However, whenever I try to print my data to Gobetwino and save it to a .txt, it freezes after 3 samples.  I thought I might be opening and closing my file too quickly, but I have put in delays and it does not change anything.

Here is my sample code, taken from the Gobetwino documentation.


Code: [Select]

int value = 877;
void setup() {
Serial.begin(9600);
}

void loop() {
Serial.print("#S|LOGTEST|[");
Serial.print(itoa((value), buffer, 10));
Serial.println("]#");

}


My issue is similar to this unresolved thread: https://forum.arduino.cc/index.php?topic=194326.0
Has anyone else had this problem before?

ieee488

where is buffer declared?

stevenir

I declared the buffer before setup.  The code should look like this:

Code: [Select]

int value = 877;
char buffer[5];
void setup() {
Serial.begin(9600);
}

void loop() {
Serial.print("#S|LOGTEST|[");
Serial.print(itoa((value), buffer, 10));
Serial.println("]#");

}

sterretje

I have no no experience with GoBetwino.

Did you try slowing down the writes? E.g. adding a delay of a second at the end of loop().

Note:
the other thread that you referred to was about a Leonardo. Which Arduino are you using?
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

stevenir

In fact, I am able to replicate this error with the minimal example:

Code: [Select]

void setup() {
}

void loop() {
Serial.println("#S|T|[]#");
}



Furthermore, I have replicated it with multiple computers, added delays, and suppressed the status messages to test the problem.  Gobetwino will unfreeze when I unplug my Arduino, but obviously, it will stop gathering the necessary data.

I feel like this should be spectacularly easy, but I am really at a loss.

Note: I am using an Arduino Micro.

Go Up