Pico-Arduino
pins_arduino.h
1 #pragma once
2 
3 #define BUILTIN_LED PICO_DEFAULT_LED_PIN // backward compatibility
4 #define LED_BUILTIN PICO_DEFAULT_LED_PIN
5 
6 #define GP0 0
7 #define GP1 1
8 #define GP2 2
9 #define GP3 3
10 #define GP4 4
11 #define GP5 5
12 #define GP6 6
13 #define GP7 7
14 #define GP8 8
15 #define GP9 9
16 #define GP10 10
17 #define GP11 11
18 #define GP12 12
19 #define GP13 13
20 #define GP14 14
21 #define GP15 15
22 #define GP16 16
23 #define GP17 17
24 #define GP18 18
25 #define GP19 19
26 #define GP20 20
27 #define GP21 21
28 #define GP22 22
29 #define GP23 23
30 #define GP24 23
31 #define GP25 24
32 #define GP26 26
33 #define GP27 27
34 #define GP28 28
35 #define GP29 29
36 
37 #define A0 26
38 #define A1 27
39 #define A2 28
40 #define A3 29
41 
42 
43 // Some applications expect on the Arduino SPI SS
44 #ifndef SS
45 #define SS 17
46 #endif
47 
48 
49 // The following defines are use by the arduino-pico framwork and can be redefined if necessary
50 
51 // ----
52 // Serial1: UART0 tx/rx = gp0/gp1;
53 
54 #ifndef SERIAL1_TX
55 #define SERIAL1_TX 0
56 #endif
57 
58 #ifndef SERIAL1_RX
59 #define SERIAL1_RX 1
60 #endif
61 
62 // Serial2: UART1 tx/rx = gp4/gp5;
63 
64 #ifndef SERIAL2_TX
65 #define SERIAL2_TX 4
66 #endif
67 
68 #ifndef SERIAL2_RX
69 #define SERIAL2_RX 5
70 #endif
71 
72 // ----
73 // PicoHardwareI2C Wire(i2c0, 160, GP12, GP13);
74 
75 #ifndef I2C_SDA
76 #define I2C_SDA 12
77 #endif
78 
79 #ifndef I2C_SCL
80 #define I2C_SCL 13
81 #endif
82 
83 // PicoHardwareI2C Wire1(i2c1, 160, GP14, GP15);
84 #ifndef I2C1_SDA
85 #define I2C1_SDA 14
86 #endif
87 
88 #ifndef I2C1_SCL
89 #define I2C1_SCL 15
90 #endif
91 
92 // ----
93 // spi0: pinRx = 16; pinTx = 19; pinCS = 17; pinSCK = 18;
94 
95 #ifndef SPI_RX
96 #define SPI_RX 16
97 #endif
98 
99 #ifndef SPI_TX
100 #define SPI_TX 19
101 #endif
102 
103 #ifndef SPI_CS
104 #define SPI_CS 17
105 #endif
106 
107 #ifndef SPI_SCK
108 #define SPI_SCK 18
109 #endif
110 
111 // spi1: pinRx = 12; pinTx = 11; pinCS = 13; pinSCK = 10;
112 #ifndef SPI1_RX
113 #define SPI1_RX 12
114 #endif
115 
116 #ifndef SPI1_TX
117 #define SPI1_TX 11
118 #endif
119 
120 #ifndef SPI1_CS
121 #define SPI1_CS 13
122 #endif
123 
124 #ifndef SPI1_SCK
125 #define SPI1_SCK 10
126 #endif
127 
128 
129