Asked — Edited
Resolved Resolved by CochranRobotics!

Converting A String To Integer In Ez Scripting

I am using the plug in for the XV-11 Lidar. The output of the plug in an array in which each value is a string that represents the distance at the angle and the signal strength. To use this for control of the robot, I need numbers at these angles. The format is shown in the attached example. How do I parse and convert this in EZ Scripting into an integer?

In C there is the string.split command

https://msdn.microsoft.com/en-us/library/b873y76a(v=vs.110).aspx

and then the string to integer convert.

Is there a way to do this in the EZ scripting?

User-inserted image


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#65  

Not being able to duplicate the issue makes it really tough to figure out what is going on. Get some rest. I had one of those days yesterday.

#66  

@David, I believe my Lidar control is the issue, not sure. Normally when I start my pc the Lidar starts turning, now it does not. Have you had to replace you USB controller on your Lidar. I ask be cause list night when I swapped sub cables I noticed it was pretty hot.

Anyway I welcome your invitation to have a look if you can tonight.

Note to self, never work on my robot when you have hard day at work. Lol:D

Thanks David for all your hard work for this community.

#67  

An interesting note... Last night I let the lidar plugin run while my computer went to sleep. This morning I did have a locked up ARC. I suspect that if the com port has an issue it is locking up ARC.

I will look at catching that and making it report an error.

The replacement of the controller was due to me flashing it with some dev code that I really didnt want to loose. It is interesting that yours was hot. I haven't experienced that. Can you make sure that the part that is between the lidar connections and the teeny board isnt making contact with the teensy board? This is a voltage regulator with a heat sync. I want to make sure that it isnt shorting out something.

Also, the teensy board can be removed. Under it there is a diode and a pull up resistor. Make sure that those are soldered well. You can do this from the bottom of the board without removing the teensy device.

You should also make sure that there isnt any solder bridges on the teensy or on the connectors on the bottom of the board. I did verify a few weeks back that these are hand made. It is possible that there could be a solder bridge between a couple of the ports.

#68  

Hey David. I ordered another controller version 1.2 just in case so you might wait until I get in to see if it's working or not thanks

#69  

Okay. I should still be checking for com port issues anyway. I will put this off until the weekend probably though.