NangiDev / GDSerCommPlugin

A Godot plugin to read Arduino serial input
MIT License
79 stars 13 forks source link

how do i use the serial input? #7

Closed alexxcharr closed 4 years ago

alexxcharr commented 4 years ago

hello! i am kind of new with godot and this is not an issue really but a question. From the plugin window i can see that the data is arriving but i can't understand how i can access the data from my code to use it.

NangiDev commented 4 years ago

Hello! Sorry for late answer! GLad to hear you gave my plugin a try :)

If you look inside MenuLogic.gd @ row 43

For every physics loop I read from the PORT as a string to insert it into the text label

So the Arduino will send a continuous stream of information. You will have to read it and separate it into variables. You could for example add a start and end token in your messages to be able to determine where a variable starts and ends

alexxcharr commented 4 years ago

perfect! thank you for your answer. it works just fine. keep up the great work! appreciate it! :)