tag:blogger.com,1999:blog-3131866441334625691.post5693800244579237457..comments2022-03-24T15:42:42.352-07:00Comments on Adventures with a Raspberry Pi: Pi Wars Robot Electrical DesignFootleghttp://www.blogger.com/profile/05774991388160257321noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3131866441334625691.post-88755968292480296012019-02-25T02:54:26.536-08:002019-02-25T02:54:26.536-08:00I am not aware of a way to make the i2c address ch...I am not aware of a way to make the i2c address change stick for these breakouts. I guess you could just turn each one on in turn and keep them on the same address. I opted for the mux approach because I have no free GPIO pins to use for switching (my display uses them all). So there was no easy way to reset them or update their addresses on power up. I also didn't want to have some complex sensor initialisation code to run each time I needed to reboot my robot (I saw more than a few unplanned reboots during the competition last year as robots got bashed about on the challenges).Footleghttps://www.blogger.com/profile/05774991388160257321noreply@blogger.comtag:blogger.com,1999:blog-3131866441334625691.post-23436222243726207982019-02-22T14:01:47.799-08:002019-02-22T14:01:47.799-08:00Hi, I am curious how will to run those vl53l1x. Fo...Hi, I am curious how will to run those vl53l1x. For such reason (not being able to run more than one on the same i2c) I opted for pololu version (https://coolcomponents.co.uk/products/vl53l1x-time-of-flight-distance-sensor-carrier-with-voltage-regulator-400cm-max) which has XSHUT. XSHUT is practically 'reset' - when held active (low?!) device just doesn't work (is in reset mode). If you have gpio connected to it (one vl53l1x needs it and another can be always enabled) - it lets you program i2c address of one that's not in 'reset' state, release XSHUT and program the one that just came online. My sequence is (if i2c address of vl53l1x is 0x29): check if there is anything on 0x30 and if not activate XSHUT ensuring that only one device responds on 0x29 (move it to 0x30, release XSHUT and move 0x29 to 0x31) otherwise if there is something on 0x30 then check 0x31. If 0x31 doesn't have anything then I try to move 0x29 to 0x31.<br />I am very interested if you find a way to make i2c address of adafruit boards 'stick'. Not sure how to deal it otherwise except the way you said: with i2c mux... Here's an idea for multiplex :) http://piwars.abstracthorizon.org/posts/2018/12/10/i2c-multiplexer/<br /><br />Cheers,<br />DanielAnonymoushttps://www.blogger.com/profile/09653723840515215664noreply@blogger.com