Asked
— Edited
Hi guys.
I am currently looking at a Roomba IRobot 530 on a popular auction site I want to get. I don't wish to appear rude but I need some quick advice before I place a bid, as the clock is ticking. eek
Does the 530 have a comms port to connect the EZ-B4?
Is the 530 compatible with the EZ-B4?
I've never had a robot vac so it's all new to me. I know DJ does reference the iRobot but there's no mention on models.
Cheers.
@Richard.
All being well, Vic (yes he has a name now, explanation to follow) should be ready to showcase in a week or two. Just waiting for some regulators to turn up (not the magnificent seven kind) so I can get this puppy wired up. This should be right up your alley as it a fabricated bot using odds and ends I had laying around... Oh, and a Roomba of course lol.
Okay, so a bit of an update.
I wrote a init script for "Safe Mode" and took the Roomba for a little drive to see if the sensors took over when it hit, or was going to hit a wall. It didn't. In my eyes, it was no different to "Full mode". I had control of it, but driving it off a work bench or bumping it in to walls didn't activate any of the safety features which according to the PDF doc, it was supposed to.
Next I tried to script the "Cliff sensors" with pretty good results. here's the code...
It works fairly well, but I'm not sure I 100% trust it though. Most of the time it will stop and reverse back before it reaches the edge, but a few occasions the caster went over the edge but rescued itself before I intervened. I do have a slight issue with it though... When it stops and reverses back for 2 seconds, it wants to reverse again. Have I missed something in the script?
After that, I had a play around getting the "Light touch" sensors working. I managed to put a script together that when it detects a wall, the speed reduces to a very slow crawl which works, but I have a few issues with it...
It detects walls and objects that are not even close to the Roomba which triggers the crawl speed). Is there a way to reduce the detection distance the Roomba receives, much like you can with a ping sensor?
When I start the script, 50% of the time the Roomba will take off on it's own without me pressing a forwards control. I guess its because of what I mentioned above in point 1, but don't know how to write a script to get around it.
Now this is probably due to my scripting skills (lol, or lack of), but I wrote it so when it detects a wall it will slow down, then when it hits the wall, the "Bump and wheel drop" sensors trigger the bumper sensors and stops the Roomba in it's tracks... but it doesn't and the motors continue to turn until I kill the script and press a STOP control. here's the script...
I'm a lot closer to where I want to be with this, but obviously still got some bugs to iron out, so I'd appreciate if you could tell me where I went wrong with my scripts.
Thanks.
@Steve... This won't work... uartWrite(0,1,142,45,46,47,48,49,50,51,) # soft bump sensors You can only make only one call at a time for a sensor... Single byte returns like bump sensors are pretty simple but you can only ask for the data one packet at a time... uartWrite(0,1,142,45) #one sensor packet call at a time (single byte)
Some are 2 byte returns so see my voltage script to see how to read 2 byte returns....
To be honest, what I have given you is all I have looked into with the Roomba.... I would have to spend more time to see what else I can do... But this is it for now
@Richard.
Okay buddy. No problem, thanks good to know. Thanks anyway. What if I broke it down to separate uartWrite commands like I did with the cliff sensors script. Would that make a difference, or would that still read as multiple bytes?
You can break them down into multiple writes... each write has to have a corresponding read from the buffer... If you have 3 writes to various sensors you would get 3 bytes in the buffer so 3 reads... 4 writes and then 4 reads from the buffer etc... This is only if you are reading sensors that return only 1 byte... As mentioned 2 byte reads are more complicated... So far the only 2 byte read that I have working is the voltage check...
Right gotcha. I'll have a look and your voltage check script and see if I can adapt it to the light touch sensors. Thanks again.