Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def software_reset(i2c=None, **kwargs):
- """Sends a software reset (SWRST) command to all servo drivers on the bus."""
- # Setup I2C interface for device 0x00 to talk to all of them.
- if i2c is None:
- from smbus2 import SMBus
- i2c = SMBus
- self._device = i2c.open(0x00, bus="/dev/i2c-2", **kwargs)
- self._device.write_byte(0x06) # SWRST
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement