jr2joao
@jr2joao
New Member
Joined: Feb 15, 2024
Topics: 1 / Replies: 11
Reply
RE: Read Serial Port Arduino

If i knew maxscript i wouldnt be here! I did Var = data[1] as integer And it worked but for data[2] it didnt. When i print data1 and data2 i get “200”…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

print (45 as integer) gives you 45 I have to have an integer or a float,basically a number

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

I wish I could understand what you just posted lol This is my code: port = dotNetObject “System.IO.Ports.SerialPort” “COM3” 38400 port.Open() x = 1 w…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

I changed to “”,” but the values ares still in quotation marks. I’ve found someone who had the same problem with the quoation marks. He solved the pro…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

DanGrover thank you very much! Your code splits the string but the values are in quotation marks and they can’t be converted to floats. It does the sa…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

I send actual values but maxscript puts them in quotation marks ie: “161,200” If I use the filterstring I get “161” “200” I need to transform that i…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

I don’t understand your question, like this? port = dotNetObject “System.IO.Ports.SerialPort” “COM3” 38400 port.Open() x = 1 while x > 0 do ( valu…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

denisT your code is working in spliting the values but when I print them I get “value” instead of an integer so I can’t use them as they are undefined

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

Thank you very much for your help. I tried it with and withou the comma after the y value but it didn’t work, I get this error ’ no ReadDelimitedStrin…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

denisT I’m sending x,y x,y x,y but I can use whatever works! DanGrover thank you for your sugestion but I’m a noob at maxscript, I don’t know how to…

12 years ago
Forum
Reply
RE: Read Serial Port Arduino

When I print rotX the scrip runs and I get undefined values. I think I have to do port.Readline() as string and then separate the values from the comm…

12 years ago
Forum
Topic
Forum
Replies: 29
Views: 63