Can anyone explain this piece of python code?
Code:
--------------------
rev = GPIO.RPI_REVISION
if rev == 2 or rev == 3:
bus = smbus.SMBus(1)
else:
bus = smbus.SMBus(0)
--------------------
So RPi2 and RPi3 would use SMBus(1) and RPi0, RPi1, RPi4 and RPi400
would use SMBus(0). Is that correct?
------------------------------------------------------------------------
Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=113575
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix