
leonardo46
I'm entering Ez world now. I made many robots with embedded controllers (PICs) I designed and programmed. Now I'm exploring ARC, and trying to understand what it can do for me. Scripts seem a powerful tool to make my robots go. I tested them with a simple rover, and with surprise , I realized that the response time of ez scripts was extremely long ....My robot requires short processing times to avoid crashing onto the wall !
Then I made a simple test: a script toggled a digital pin, without doing anything else. I looked at the signal with an oscilloscope . Times were in the range of several seconds !...
This way EZB cannot be used for fast data processing in a robot , but only for less critical uses, e.g. giving manual commands.
Can somebody explain scripts what are intended for ?
ptp , in addition to possible channel flooding, you say there is also no guarantee about the time needed to perform each operation . To be sure, you have to avoid everything that's time-critical. The question now is: what can I use ezb for? perhaps only as a wi-fi communicator for simple operations. No complex processing seems possible.
I thought I could make robots using only EZB, no PICs. Now I know I was wrong . Ezb needs some pic to help.
Not necessarily. It depends on what you want the robot to do. PICs are good for high precision repeatable functions. EZ-B /ARC is good for highly intelligent flexible functions and fast development.
For a few advanced users, PICs add useful adjunt capabilities, but for many many more users (10's of thousands of EZ-B's sold) the EZ-B is sufficient.
It really depends on what it is you want your robot to do.
Rather than starting with testing the limits of the platform, better to determine what your end goal is and see if the platform can perform that goal. Lots of us participate here to provide assistance and review your scripts and projects to help make sure they are performing optimally based on the functions you are trying to achieve.
Alan
Ok ,Alan. Help me to understand if my project might be EZ-only-no- pic .
I had made a simple rover, with 3 sonars and a pic, going about at 10 inches per sec , capable of avoiding obstacles and searching for alternative paths when approaching them. To achieve that i had realtime a/d conversion of analog sonars, comparison and processing of their data, decision of alternative paths and actuation of motors. All done by a pic.
Then I thought "let's see if i can do the same thing using ezb only". This way I could learn to use this interesting new tool and possibly make complex robots with less hardware and easier software to implement.
I wrote scripts to do that with ezb, and at once faced big problems. Statements were not executed, or executed in a random and impredictable way. It seems that there are communication problems, even if it works at 3,5 Mbit/sec (!) as says the datasheet. PC has to ask EZBv4 for frequent reading/a-d conversion/ comparison of 3 sonars, then say to ezb what to do. Is this hard word work for ezb?
Are you using Analog sensors or digital sonar sensors? Analog sensors do have much slower read time and need sleep statements between the reads to prevent data channel flooding. The upcoming EZ-B v4/x2 (there will be upgrade kits available) dramatically increases the number of analog reads per second, but will still require careful scripting.
Here is a link to a script that does what you describe but using a single digital PING sensor. It could be pretty easily modified to use multiple sensors or analog sensors.
https://synthiam.com/Community/Questions/3449
and updated with lots of notes:
https://synthiam.com/Community/Questions/4750
Alan
Thank you for that intersting information. Meanwhile, I managed, with the help member "PTP" , to have a code working well enough with my robot and sensors. I'll study it , to get a know-how in scripts. Programming that way is new for me, being used to basic or assembler on pics. I'll try to learn.
One thing I have learned: Pc+ ezb can do many things, but cannot be the solution if you want a very fast, precise, and stable closed-loop control system . If so, you need a local control system. EZb would be great in giving it commands, getting digital and/or analog data, etc.
Scripts can be as fast as you want them to be. There are settings for each frame. One of them is the speed You can change it to be -1, 0, 2 etc.