Hello, my code is freezing on very simple code. For debugging purposes I use serial.println() String number = "5"; Serial.println("starting conversion"); int stringNumber = number.toInt(); Serial.println("conversion done"); When i execute this, it gets stuck at the .toInt() function Also, when I try to divide a long : long duration = 2000; Serial.println("division start"); long result = duration / 25; Serial.println("division end"); Same problem occurs, the code just seems to stop there , it never gets to "division end". Anyone got any insight on why code is bugging with these common operations? My code is working fine on some arduino uno board, but it won't work on the embeded board on the udoo. thanks a lot !
After more investigation, any kind of calculation freezes the code. I can't even make an addition such as int i = 0; i = i+1;
What language are you using? I'm assuming that it's c++, but it could be objective c. In just boring c I was able to get calculations to works.
Hi, I have also a "freezing" problem but it is not because of the operation: it is due to a String variable declaration!! This is my code: // ---------------------------------------------------------------------------------- String test; void setup() { Serial.begin(9600); } void loop() { Serial.println("Test"); delay(1000); } // --------------------------------------------------------------------------------- If I comment out the String declaration the loop is workin as expected. With the declaration I can compile the code and download it but I have no outputs, i.e. the program is freezing. Some ideas? Stefano