Advertisement
silver2row

SMBUS2 and PATHLIB

Dec 19th, 2019
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. from smbus2 import SMBus
  2. import time
  3. import pathlib
  4.  
  5. # reset pin is P9.23, i.e. gpio1.17
  6. reset_pin = pathlib.Path('/sys/class/gpio/gpio49/direction')
  7. reset_pin.write_text('low')
  8.  
  9. MotorBridge = SMBus(0x4b, 2)
  10.  
  11. ReadMode  = 0
  12. WriteMode = 1
  13. DeAddr    = 0X4B
  14. ConfigValid =  0x3a6fb67c
  15. DelayTime = 0.005
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement