Sensor Success!

I’m happy to report that I’ve now managed to get multiple VL53L0X sensors working together, by plugging them in one-by-one and re-addressing each in turn. Silly problems I was having last week we just because I had the initialisation code called in the wrong place. šŸ™„

So we headed to Manchester Raspberry Jam on Saturday with working sensors, all ready to try out the straight line speed test (some nice long sections of wall that were good for that test there). Of course things didn’t go completely to plan, and we ended up with a robot that wiggled all over the place and then headed off in completely the wrong direction. That was working with just a single sensor, mounted on the left hand side.

Meanwhile Peter worked on the design of an arm for the skittles comp, Angus helped me puzzle over the logic of the code, and Erin continued to work her way through tutorial on her Kano OS driven pi.


(It looks very quiet because most of the participants were busily involved in a tutorial in the next room.)

Anyway, not a rangingĀ success on Saturday, but some progress.

So on Sunday, it was more work on the same, making the logic a bit more complex (comparing the current distance to previous one to determine heading), then taking appropriate action based on how far we were from the wall. (Too close: turn away; too far: turn towards; just right: straighten up and head forwards.) But even this logic wasn’t working too well, with some serious over-correction problems… SoĀ Peter suggested puttingĀ two sensors on the same side, to make it easier to check the robot heading relative to the wall. And then Angus decided he needed to do some driving problems, and flattened my batteries! Ā (That’s the problem with the LiPo batteries: nice and juicy, but short life!) Previously I’ve been able to do parallel development on my alternate chassis, but not for this work. Firstly, I don’t have spare sensors (and they’re not cheap enough to justify changing that situation), but more importantly, the physical characteristics of the robot here are quite important, and my alternative chassis has very different physical characteristics. Anyway, I’ve taken a copy of the code and am working on beefing up the logic (including complicated mathematical calculations). When I get it back on board the robot, I’ll be able to make sure my logic is correct and more importantly, make sure the calculations aren’t too complex (they need to fit within the update cycle of the sensor readings, or things with be completely messed up).

Oh, and I’ve ordered some more spare batteries that should arrive today, so hopefully will eliminate (or at least reduce) the waiting around for charging to finish problem! (We have certainly verified that our low battery alarm is effective though šŸ˜€)


One thought on “Sensor Success!

  1. Shame we couldn’t make it to MCR raspberry jam, would have been good to share some experiences (we’re learning everything as we go). Nice choice of Sensor! – we went with Sharp sensors and they are analog – should be ok now though as we’ve got an ADC solution (another learning curve!).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s