Hello Everyone, this is my first attempt in learning to work with Arduino. I do have some programming experience, but not with C++ (ruby, javascript, php), so I found myself on unfamiliar ground.
I fail to understand why my code (below) will refuse to return the second argument complete. In fact, if there wouldn't be a delay between the two Serial.println() calls, it wouldn't even print the first argument completely.
I tried to figure it out using the documentation provided, but couldn't find anything to explain this paranormal behaviour.
void setup() {
// put your setup code here, to run once:
Serial.begin(19200);
}
void numbers(String txt, int num){
Serial.println(txt);
//without delay, it will only print "my" - the first part of the "txt"
delay(100);
Serial.println(num);
}
void loop() {
// put your main code here, to run repeatedly:
numbers("my text", 180);
abort();
}
i am learning how to stop a script so it won't run continuously... i just found abort() as a method of stopping, but didn't find much about it. Not sure if is the best method from what it seems....
Thank you for the flush. I will have to document myself about, as I am not used with C++