Purple
USA
Asked
— Edited
I'm new to EZ robot. I have motors connected through a sabertooth 2x12A controller to my robotic joint and I have read back from a potentiometer for position. I can see the position on the graphic display and the digital voltage readout. Everything is working as expected. I then assume, that for me to control it they way that I have to, I need to write a script. I opened the EZ script and went to read the analog voltage using GetADC(0) and it responds during the syntax check that it is an unknown command. As you can probably tell I'm lost, could someone help steer me in the right direction? Thanks
You were almost right.
Example:
The EZ-Script manual is on the right of the EZ-Script control and gives information on all commands including examples.
Also, I would suggest reading through my An Introduction To Scripting post. it covers GetADC.
I'll check it out. Thanks!
Also, a good person to ask is @dschulpius who made the Lost In Space b9. He did the same thing. He made his own giant servo with a motor and potentiomememememeter
I'm losing my mind. The thing that scares me about all this stuff is the programming. So today is really getting to me. It's the littlest things that keep me from progressing. Her's where I am getting hung up I am trying to do : in my If (GetADC(0) > 155) works great, but if I try replacing the GetADC(0) with a variable like $position like this If ($position > 155) it just does not work. I am probably doing something really stupid, help.
Honestly, if you read through my Introduction To Scripting post (I know it's long but it's worth it) you will learn about GetADC, variables etc.
The short answer though is a variable, such as $position needs to be defined.
Thank Rich, I did read your Introduction To scripting, I think it's great and plan on reading a few more times. I'm just trying to get my new EZ board going, and rushing. I was using another brand of controller board but gave up due to the complexity. I don't think that I will hit that point with EZ robot, it's everything I was looking for. Thanks again for the help.