Python Forum

Full Version: SMBUS Support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to transfer five integer values from Python to an Arduino using SMBus, but I have run into a lack of useful documentation on SMBus. The best I have found is at wiki:linux:python:smbus:doc, but that still leaves questions.

Many of the functions require a 'cmd' parameter and the only example that they show is: b.read_byte_data(0x2f,0x58) where 0x2f is the address and 0x58 is cmd. What command is a hex 0x58? Where can I find a list of the other commands in values in hex? Other SMBus functions call for a 'char cmd' - would they be the character equivalents of the hex values?
Don't know if this will help, but here's some sample code