
irobot58
As robots become more elaborate mechanically the software must keep up. As the monitoring of sensors, particularly, increases, I would like to know what the experianced robot builders opinions are of how to keep the software from " hanging up, bogging down etc" What is the most time intensive ARC commands and scripts? Also what time limitation does the EZ-Board have, using Bluetooth(slow), I2C, Analog input and digital. Even Wifi! I know the video processing takes a lot of time leaving less time for other monitoring etc. Percentages of EZ Builder commands and scripts processing time , to the best of your opinions would be helpful . I understand of course that a faster PC that has been stripped down of any extra "tasks" keeps processing time fast! I know Rich and others have dedicated PCs stripped down for that reason. I hope that sounds clear
to If then Else or not to If then Else ..that is the question:
Whether 'tis Nobler in the mind to suffer
The Slings and Arrows of outrageous Fortune Hamlet(bot)
I will touch on the benchmark control quickly though. Start a new project, connect to the EZ-B with no controls, add control Benchmark and run it to see your communications "speeds". This will help with your working out the timings of scripts. For instance, if it can read the ADC port 40 times a second then you can read all 8 5 times each every second. So if you have sensors being checked you need 1/5 seconds of delay between reading, or 200ms. That's without anything else happening too.
As a rule of thumb, where possible and acceptable I use a sleep of 500ms or sometimes more than 1000. My battery monitor for instance checks every 2000 ms because it's not going to be a problem, it leaves it possible to check the IR sensors every 100ms without saturating the communications.
Hopefully that made sense, or enough sense to understand. Like I said, I will revisit this one when my head is clearer
I've been lurking almost every dayhere on the forum and storing little tricks, tips and needed info for when I start working on EZB control again. I need to get deep into my ARC project and clean it all up and tweak it with all the recent ARC enhancements. I'm really excited and will hopefully will get back to that stage soon. This is one reason this thread you started sparked my interest. I've had small problems with timing between the 3 EZB boards and motor movements. For example when I pull the power pack on B9's side he should appear to go completely dead and slump over. "Sometimes" he will wait up to 10 seconds before slumping over. I think I narrowed this delay down to the way the commands are issued in my "Kill" script and the the way I have the Sleep commands set up (kinda like Rich mentions above). Length and placements of this command seems to be key.
Good luck and have fun!
Dave Schulpius
You can use the scripts to read and the variable watcher to display the ADC values, this saves the bandwidth of the bluetooth as it doesn't read the same thing twice.
I'm afraid I have been unlucky with the ADC monitor. It doesn't slow down my PC, it just freeze it completely. I haven't use it since 4 releases ago of EZ-B. I am not sure if it have been updated or fix. I will try it again and share my result.
My cousin just gave me an old PC for my robot projects, So I will use it as a dedicated robot server ( MIMIC Jarvis), control The Z waves ( lights, door locks etc), Run EZ-b round the clock. It is only a dual core with 1 gig of ram but should be enough to run EZ-B, since that will be it's only purpose. I will develop on my main PC, and simply upload the file to my robot server PC. *blush* *blush*
In general all things being equel , how would you rate processiing time from fastest to slowest of
Digital, ADC, Serial, I2C through the EZ-B 's blue tooth and then WIFi