
Andy Roid
Hello,
I have two cameras mounted on servos. They are set it up in tracking color mode (red). I have an 10 foot square area. The cameras are mounted in two locations (5 feet from a corner), 90 degrees from each other, against the outside wall . While tracking, I want to read the values the servos are at, and display the value. I know I can only read the information sent, not the true value.
I want to take these values and compare them to a preset value or coordinates.
My end goal is to track a Movement Panel to these two values.
My scripting skills are minimal to say the least, but can someone point me in a direction to find examples of these concepts?
I search around and know the "servo read" is somewhere, but I can't remember where.
Rich, Dave and Richard R, posted some information about this. Any ideas?
Ron R
I just got your reply. Do you see what I am trying to do and am I on the right track? I think, for a simple idea, it should work.
I have to go out now, but I will try to make it more basic and rewrite it. This way I will learn more and build an example to use.
Thanks for the reply
Nomad has been quiet lately... I wish him well !
Ron R
Sorry Andy, absolutely none of that code makes any sense.
IF conditions without closing ENDIFs
Comparing GetDigital() with integer values. As the manual states, GetDigital returns a True (1) or a False (0) only, because it is Digital. Read dictionary definition of the word Digital
Incorrect comparison used for Greater Than Equals, should be >= not =>
Random single line functions not assigned to variables (i.e. GetAsByte()). Also a bunch of variables with nothing being assigned specified on single lines.
ClearVariables() being used, which i don't know why that would ever be done outside of loading a new project because it clears every variable in the stack.
My advise is to visit the LEARN section and click on ACTIVITIES course. There are lessons which explain how to do basic tracking. Once you have successfully accomplished those activities, use the EXAMPLES folder in ARC to see examples of EZ-Script functions and how they work.
I will continue to work at learning more about scripting. Thanks for the constructive criticism.
Ron R
@ANDY ROID Approach ARC scripting like Lego... Get a small piece working then build from there... It's best to download other people's code or look at the built in examples in ARC....
For example
Thanks Richard,
I had only wanted to post "CONCEPT" not real code. That is why I listed it in thread # 20 with labels, not using the UBB Code. Dj' s reply was code issues , not concept issues, so he replied firmly.
In the future I will build my ideas in code to the best of my ability. Your advice is well taken and I will do line by line testing of my script to be sure it works. I will then post the real scripting.
I still think my idea will do what I want.
More to come...LOL
Ron R
I got the test script working. I can load a verbal command (Goto A) which loads a coordinate. It runs the continuous servos until the camera servo value matches the coordinate.
My next problem is getting better vision/tracking. I was using a web cam, but now I think I will need to, at minimum, use the "old" Ez robot camera. I think Dj said it was better than a web cam, but not as good as the new release one. I am hoping a wireless unit once spoke of comes out soon. Otherwise I will have to buy a new one or any suggestions?
What has been found to be the best color to use for tracking? Can I use a light beacon? Any suggestions. I was thinking a maybe white because it is neutral?
I am getting closer to a full trial.
Ron R
This is the Test script. It is not fully completed but it worked for testing. I am aware it needs additional work. Posted for @castlephelps.
I will be labeling the lines soon.
Ron R