Grasshopper

algorithmic modeling for Rhino

I'm trying to control my lego NXT with the Serial Write/Read component from the firefly plugin. it does not work, but i think i know where the problem is, i'm using the Lego NXT communication protocol (LCP) to communicate with the NXT, so the message has to exactly look like this : “0x0c 0x00 0x00 0x04 0x00 0x64 0x07 0x01 0x32 0x20 0x00 0x00 0x00 0x00” to control a motor for example. the thing i don't know is how does the Serial Write component convert the message that it is sending, does it still look like the example above or is it in some way different because of the way grasshopper handles information as lists.

if it is somehow not possible to use the firefly plugin for this use, is there another quick way to comunicate through serial communication with the NXT?

i am curious for the answers, thank you for you help.

Views: 453

Replies to This Discussion

after some heavy research i found that the problem is not how the Serial write component sends the data that it gets, it is the format that is wrong.

the data, that the nxt has to receive, has to be structered in 4 bytes like 0x00 or 0xe5. if i use these exact chars as input (within a panel), the data is a text string (i feel a little dumb, for not realising that in the first place) and the nxt can't handle the information.

this implies the question, how do i format the essential "numbers" as bytes structered like this 0x00?

as always i am curious for the answer, thank you for you help.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2026   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service