Skip to content

Commit d97c522

Browse files
committed
docs: One more list fix in I2C & SPI.
1 parent 8787a6d commit d97c522

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/programming_guide/03_i2c_spi.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Now we're almost ready to read data from the sensor. However just like with I2C
169169
bytearray(b'\x01\xa8\x1a\xf0')
170170

171171
Before digging into the results let's break down what just happened:
172+
172173
- The with statement uses a context manager to automatically lock the SPI bus. You don't need to worry about locking and unlocking the bus by using the with statement, but again be sure to indent all the code that runs while the SPI bus is locked.
173174
- The :py:func:`busio.SPI.configure` function is called to configure the speed, phase, and polarity of the SPI bus. It's important to always call configure before talking to your device as communication with other devices might have changed the speed, polarity, etc. You'll need to look up the exact speed and other values from your device's datasheet. For the MAX31855 we'll use a speed of 5mhz and a polarity and phase of 0 (sometimes called mode 0).
174175
- Next we toggle the CS line down to a low logic level. Remember with SPI each device needs a chip select line to tell it when it's ready to send and receive data.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy