Search found 1 match
Search found 1 match • Page 1 of 1
- Mon Dec 07, 2015 7:41 pm
- Forum: Français
- Topic: How to read/write register with SPI
- Replies: 17
- Views: 5553
#!/usr/bin/env python # Import SPI library # from spidev import SpiDev # pack, unpack for the decoder # from struct import pack, unpack # Decodes register values to Celsius (or returns None if chip is in startup, needs ~300ms after power-up) # tc77_celsius = lambda r: ( (unpack('>h', pack('BB', *r)...