blob: 63870c68dfe56bcf9b70e8e35e4d5101469415ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
*******************
Raspberry Pi Pico
*******************
Some notes on using the Raspberry Pi Pico series.
Circuitpython
=============
The official documentation_ from adafruit is pretty comprehensive; these
are just quick notes with easy to copypaste frequently used commands.
.. _documentation: https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/overview
I2C
---
There is no board.I2C(), to use i2c instead see the pinout_ diagram to
find a pair of pins with an available I2C port (I2C0 or I2C1, both
available on multiple pins) and then::
import board
import busio
i2c0 = busio.I2C(scl=board.GP1, sda=board.GP0)
.. _pinout: https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/pinouts
SPI
---
Like I2C, you can use any set of pins labelled SPI0 or SPI1 on the
pinout_ and then e.g.::
import board
import busio
spi0 = busio.SPI(clock=board.GP2, MOSI=board.GP3, MISO=board.GP4)
See also
========
..
vim: set filetype=rst:
|