Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
M1BWS Newbie Joined: 13/02/2017 Location: United KingdomPosts: 1
Posted: 12:59am 15 Feb 2017
Copy link to clipboard
Print this post
On Raspberry pi there is a utility in i2c-tools to map all the i2c devices connected. I am a newcomer to MMBasic and I was wondering if anyone written something similar to take the hassle out of trying to find conflicting addresses?
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10215
Posted: 04:49am 15 Feb 2017
Copy link to clipboard
Print this post
It is trivial to do in Basic
[code] Sub i2ctest Local integer i,j I2C open 400,1000 For i=8 To &H77 I2C read i,0,1,j If MM.I2C=0 Then Print "found address ",i Next i I2C close End Sub[/code]
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2932
Posted: 05:34am 15 Feb 2017
Copy link to clipboard
Print this post
Nice one Peter - that is a really useful code snippet