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.
|
Forum Index : Microcontroller and PC projects : I2C addresses on plus and extreme
Author | Message | ||||
M1BWS Newbie Joined: 13/02/2017 Location: United KingdomPosts: 1 |
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: 8605 |
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: 2794 |
Nice one Peter - that is a really useful code snippet For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
Print this page |