algorithmic modeling for Rhino
I'm trying to upload the firefly Firmata in the Arduino application but I'm getting an error in the void loop. This is the part of the code that is having an error. It keeps telling me that it can not convert 'Serial' to 'bool'. I'm very new to this and have no idea what is wrong. Can anyone help me get this set up?
void loop()
{
if(Serial){
ReadSerial(); // read and parse string from serial port and write to pins
if (counter >= numcycles){ // Wait every nth loop
ReadInputs(); // get input data
PrintToPort(); // print data to serial port
counter = 0; // reset the counter
}
counter ++; // increment the writecounter
}
}
Tags:
Hi David,
I've got a same problem with Rhino 4 + SR9, and Arduino 1.0.
I'm just wondering if you could fix the problem.
Saru
It worked when I tried again with Arduino 1.05.
Hi Saru and David,
Yes, the issue is that you have to upgrade to the latest Arduino IDE. They updated the Serial library at some point after releasing v.1.0 and added this functionality. If you use the latest IDE software, you should be able to upload the code.
Also, for future reference, you may get better results if posting Firefly specific questions in the Firefly group page. Let me know if you encounter any additional problems.
Best,
Andy
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by