Grasshopper

algorithmic modeling for Rhino

Hello!

I have a question which I am sure has a simple solution because I think I am doing something pretty ignorant.

I am using the sample 'Serial Event' sketch that comes with the Arduino IDE.  I want to be able to write to the arduino, and have the arduino interpret that input.  I can easily read through the generic serial.

The issue occurs when I try to write and receive a response.

The Serial Event sketch when uploaded and run from the IDE works fine.  I open up the serial monitor, I type, when I give it a new line (which is what it expects to print out the text to the serial monitor) I get the expected behavior.

From grasshopper, when I write to the arduino with the serial write component, I get nothing in the serial read component, even though I send a '\n'

I tried to change the character it is waiting for to something else.  Again, it works in the serial monitor and not in GH.  Let me know if I need to explain myself better because I am writing this quickly!

thanks

Luis

Views: 1139

Replies to This Discussion

Hey Luis,

so could you finally resolve the issue or find the reason??
I am kind of facing the same problem with my Micro (and posted it here)

Thanks and Greets
Benjamin

Yes.  I should have updated the discussion.  Not sure why, but I just tested with the serial event example that comes with the Arduino IDE, and sending data to the Arduino works just fine...receiving data from the arduino works just fine in GH...all using the generic read and write.  I do not think anything in Firefly has changed since I asked the question originally.

I am using a generic write to send a counter value, and serial read to read this.  The serial event code has both the reading and the writing code already there, so that code is uploaded to the arduino as is.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service