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.
Upgrade to ARC Pro
Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.
When I tried it yesterday it was in full mode. When it hit the wall the motors stopped fine but it did hit the wall with a bit of a thud, where as on a normal cleaning cycle it would detect the same wall and slow down bumping it softly.
Same thing with the cliff sensors. It was in full mode and ran the sensor script, put it on a work bench but didn't detect when it fell off (I was waiting to catch it) and the motors were still running so had to hit the stop button on the movement control. That's why I thought the running IR sensor script included the cliff sensor too. The battery check script is golden and works well.
I'll give the revised script a try and report back.
Place your Roomba on the table (it shouldn't move because my script doesn't have a drive command in it) or somewhere you can read your pc and press the roombas physical bumpers and or hold objects in front of the light bumpers at the same time. Run the script in post #75... Now use your hand and press the roomba's bumpers... you should see numbers from 0 - 3 in the print window depending on where you press on the bumper...
Thanks again buddy. I'll give that a try later on today. Just went to try it but the thing wouldn't move and the red light came on. Turned out that even though it was on the dock all night, it didn't charge. Got a quick pulsing orange now so it's going to be a few hours before I can try it.
Thanks again for your help (and your patience). It's really appreciated.
So please correct me if I'm wrong, but if I have the Roomba in "Safe mode" I have full manual control of the motors, but cannot manually control the sensors which I take to mean that all the sensors, bump, light touch, cliff ect will all be on, and when it detects when it's going to hit a wall or fall down the stairs the sensors take over and over rides manual control. So what I need to do is write a "Safe mode" init script to run the Roomba via a Movement Panel ect with all the sensors automatically set to "On". Is that right?
In full mode (which I usually use)... You have to do all the thinking for the Roomba... If it senses a cliff and you don't tell it to stop, backup or turn, well the poor little guy is going to commit suicide by attempting to drive down the stairs...
Yeah, when it docked last night I think I did it manually so it was still in full mode, hence why it didn't charge. *eyeroll* Lesson learned.
If you keep reading the IO PDF I uploaded it will do two things... 1) Put you to sleep really fast LOL and 2) Get you the most out of programming and controlling the Roomba...
Yes, between the Zzzzz's *sleep*, I keep going back to it and having a good read. A lot to take in for a novice like myself lol, but I'm starting to make some sense of it and it is a good read. So if I have this right, taking this for example...
uartwrite(Board, Port, data, data)
So writing something like this...
Serial sequence:  [Right velocity high byte] [Right velocity low byte] [Left velocity high byte] [Left velocity low byte]
Would be written in script something like this...
uartwrite(Board, Port, data, data, data, data, data)
Is that correct?
uartwrite(board, port, request for a data packet, data packet requested)
If you open my custom Movement Panel for roomba driving you can just use all those commands in a script for forward, reverse, left, right and stop... That way you don't have to mess with the velocity high and low byte stuff...
uartWrite(0,1,137,0,$speed,0,0) #forward movement
where $speed is (I think) any number between 1 to 255... 100 seems to be a nice slow speed for most situations....
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.
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...
1) 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?
2) 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.
3) 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.
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
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?