|
vbsript setprecision Sam from United States [4 posts] |
16 year
|
I'm trying to use my arduino board in addition to some servos I have hooked up to it while running roborealm. I'm using the serial module to deliver the stream to the arduino board. My problem is that the data spit out by the serial module are longs not ints and the arduino board is flips out if it gets something other than a whole number. Can I use setprecision somehow within the vbscript to drop the decimals? I'm using the .robo file from the object tracking tutorial.
|
|
|
Anonymous |
16 year
|
Take a look at CInt or CLng in vbscript that shoud drop the decimals
Dim MyDouble, MyInt
MyDouble = 2345.5678 ' MyDouble is a Double.
MyInt = CInt(MyDouble) ' MyInt contains 2346.
|
|
|
Sam from United States [4 posts] |
16 year
|
|