@@ -35,8 +35,10 @@ New sketch can be created in current folder by the command:
35
35
36
36
eg:
37
37
38
- > \$ arduino-cli sketch new cli-blink
39
- > Sketch created in: C:\projects\cli-blink
38
+ ``` bash
39
+ $ arduino-cli sketch new cli-blink
40
+ Sketch created in: C:\p rojects\c li-blink
41
+ ```
40
42
41
43
A folder with ` .ino ` file will be create for you.
42
44
@@ -48,9 +50,11 @@ You can open this file in you favorite IDE or text editor.
48
50
49
51
` arduino-cli board list `
50
52
51
- > \$ arduino-cli board list
52
- > Port Type Board Name FQBN Core
53
- > /dev/ttyACM1 Serial Port (USB) Arduino/Genuino MKR1000 arduino:samd: mkr1000 arduino: samd
53
+ ``` bash
54
+ $ arduino-cli board list
55
+ Port Type Board Name FQBN Core
56
+ /dev/ttyACM1 Serial Port (USB) Arduino/Genuino MKR1000 arduino:samd:mkr1000 arduino:samd
57
+ ```
54
58
55
59
## Compile and upload the sketch
56
60
@@ -86,9 +90,11 @@ Run the following command to compile the sketch
86
90
87
91
and you will get output like
88
92
89
- > \$ arduino-cli compile --fqbn arduino:avr: nano cli-blink
90
- > Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.
91
- > Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
93
+ ``` bash
94
+ $ arduino-cli compile --fqbn arduino:avr:nano cli-blink
95
+ Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.
96
+ Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
97
+ ```
92
98
93
99
- If you get any error like
94
100
@@ -100,79 +106,14 @@ and you will get output like
100
106
101
107
` arduino-cli board listall `
102
108
103
- > \$ arduino-cli board listall
104
- > Board Name FQBN
105
- > 4D Systems gen4 IoD Range esp8266:esp8266: gen4iod
106
- > ATtiny13 MicroCore:avr: attiny13
107
- > Adafruit Circuit Playground arduino:avr: circuitplay32u4cat
108
- > Adafruit Feather HUZZAH ESP8266 esp8266:esp8266: huzzah
109
- > Amperka WiFi Slot esp8266:esp8266: wifi_slot
110
- > Arduino esp8266:esp8266: arduino-esp8266
111
- > Arduino BT arduino:avr: bt
112
- > Arduino Duemilanove or Diecimila arduino:avr: diecimila
113
- > Arduino Esplora arduino:avr: esplora
114
- > Arduino Ethernet arduino:avr: ethernet
115
- > Arduino Fio arduino:avr: fio
116
- > Arduino Gemma arduino:avr: gemma
117
- > Arduino Industrial 101 arduino:avr: chiwawa
118
- > Arduino Leonardo arduino:avr: leonardo
119
- > Arduino Leonardo ETH arduino:avr: leonardoeth
120
- > Arduino Mega ADK arduino:avr: megaADK
121
- > Arduino Mega or Mega 2560 arduino:avr: mega
122
- > Arduino Micro arduino:avr: micro
123
- > Arduino Mini arduino:avr: mini
124
- > Arduino NG or older arduino:avr: atmegang
125
- > Arduino Nano arduino:avr: nano
126
- > Arduino Nano Every arduino:megaavr: nona4809
127
- > Arduino Pro or Pro Mini arduino:avr: pro
128
- > Arduino Robot Control arduino:avr: robotControl
129
- > Arduino Robot Motor arduino:avr: robotMotor
130
- > Arduino Uno arduino:avr: uno
131
- > Arduino Uno WiFi arduino:avr: unowifi
132
- > Arduino Uno WiFi Rev2 arduino:megaavr: uno2018
133
- > Arduino Yún arduino:avr: yun
134
- > Arduino Yún Mini arduino:avr: yunmini
135
- > DOIT ESP-Mx DevKit (ESP8285) esp8266:esp8266: espmxdevkit
136
- > Digistump Oak esp8266:esp8266: oak
137
- > ESPDuino (ESP-13 Module) esp8266:esp8266: espduino
138
- > ESPectro Core esp8266:esp8266: espectro
139
- > ESPino (ESP-12 Module) esp8266:esp8266: espino
140
- > ESPresso Lite 1.0 esp8266:esp8266: espresso_lite_v1
141
- > ESPresso Lite 2.0 esp8266:esp8266: espresso_lite_v2
142
- > Generic ESP8266 Module esp8266:esp8266: generic
143
- > Generic ESP8285 Module esp8266:esp8266: esp8285
144
- > ITEAD Sonoff esp8266:esp8266: sonoff
145
- > Invent One esp8266:esp8266: inventone
146
- > LOLIN(WEMOS) D1 R2 & mini esp8266:esp8266: d1_mini
147
- > LOLIN(WEMOS) D1 mini Lite esp8266:esp8266: d1_mini_lite
148
- > LOLIN(WEMOS) D1 mini Pro esp8266:esp8266: d1_mini_pro
149
- > LilyPad Arduino arduino:avr: lilypad
150
- > LilyPad Arduino USB arduino:avr: LilyPadUSB
151
- > Linino One arduino:avr: one
152
- > NodeMCU 0.9 (ESP-12 Module) esp8266:esp8266: nodemcu
153
- > NodeMCU 1.0 (ESP-12E Module) esp8266:esp8266: nodemcuv2
154
- > Olimex MOD-WIFI-ESP8266(-DEV) esp8266:esp8266: modwifi
155
- > Phoenix 1.0 esp8266:esp8266: phoenix_v1
156
- > Phoenix 2.0 esp8266:esp8266: phoenix_v2
157
- > Seeed Wio Link esp8266:esp8266: wiolink
158
- > SparkFun Blynk Board esp8266:esp8266: blynk
159
- > SparkFun ESP8266 Thing esp8266:esp8266: thing
160
- > SparkFun ESP8266 Thing Dev esp8266:esp8266: thingdev
161
- > SweetPea ESP-210 esp8266:esp8266: esp210
162
- > ThaiEasyElec's ESPino esp8266:esp8266: espinotee
163
- > WeMos D1 R1 esp8266:esp8266: d1
164
- > WiFiduino esp8266:esp8266: wifiduino
165
- > WifInfo esp8266:esp8266: wifinfo
166
- > XinaBox CW01 esp8266:esp8266: cw01
167
-
168
109
### Upload the sketch
169
110
170
111
- Use the command:
171
112
` arduino-cli upload -p YourBoardPort --fqbn YourBoardFQBN YourSketchName `
172
113
173
114
- To compile sketch called ` cli-blink ` for ` Arduino Nano ` connected in Port ` COM3 ` run the following command:
174
115
175
- ` arduino-cli upload -p COM3 --fqbn arduino:avr:nano cli-blink `
116
+ ` arduino-cli upload -p COM3 --fqbn arduino:avr:nano cli-blink `
176
117
177
118
## Install 3rd party cores.
178
119
@@ -183,8 +124,11 @@ and you will get output like
183
124
- Create a configuration file if it doesn't exist by the command:
184
125
` arduino-cli config init `
185
126
186
- > \$ arduino-cli config init
187
- > Config file written to: C:\Users\B45i\AppData\Local\Arduino15\arduino-cli.yaml
127
+ ``` bash
128
+ $ arduino-cli config init
129
+ Config file written to: C:\U sers\B 45i\A ppData\L ocal\A rduino15\a rduino-cli.
130
+ yaml
131
+ ```
188
132
189
133
- Open the configuration file in any editor and add new board manger url to ` board_manager > additional_urls ` .
190
134
@@ -200,42 +144,18 @@ board_manager:
200
144
- now update the core by command:
201
145
` arduino-cli core update-index`
202
146
203
- > \$ arduino-cli core update-index
204
- > Updating index: package_index.json downloaded
205
- > Updating index: package_esp8266com_index.json downloaded
147
+ ` ` ` bash
148
+ $ arduino-cli core update-index
149
+ Updating index: package_index.json downloaded
150
+ Updating index: package_esp8266com_index.json downloaded
151
+ ` ` `
206
152
207
153
- If you do `arduino-cli core search esp8266` you can see esp8266 listed.
208
154
209
155
- Compile code for nodeMCU :
210
156
211
- > \$ arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 cli-blink
212
- > Executable segment sizes:
213
- > IROM : 227612 - code in flash (default or ICACHE_FLASH_ATTR)
214
- > IRAM : 26776 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
215
- > DATA : 1252 ) - initialized variables (global, static) in RAM/HEAP
216
- > RODATA : 672 ) / 81920 - constants (global, static) in RAM/HEAP
217
- > BSS : 24880 ) - zeroed variables (global, static) in RAM/HEAP
218
- > Sketch uses 256312 bytes (24%) of program storage space. Maximum is 1044464 bytes.
219
- > Global variables use 26804 bytes (32%) of dynamic memory, leaving 55116 bytes for local variables. Maximum is 81920 bytes.
157
+ ` arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 cli-blink`
220
158
221
159
- Upload to nodeMCU connected on `COM4` :
222
160
223
- > \$ arduino-cli upload -p COM4 --fqbn esp8266:esp8266:nodemcuv2 cli-blink
224
- > No new serial port detected.
225
- > esptool.py v2.8
226
- > Serial port COM4
227
- > Connecting....
228
- > Chip is ESP8266EX
229
- > Features: WiFi
230
- > Crystal is 26MHz
231
- > MAC: 50:02:91:dc:bf:05
232
- > Uploading stub...
233
- > Running stub...
234
- > Stub running...
235
- > Configuring flash size...
236
- > Auto-detected Flash size: 4MB
237
- > Compressed 260464 bytes to 190651...
238
- > Wrote 260464 bytes (190651 compressed) at 0x00000000 in 17.7 seconds (effective 118.0 kbit/s)...
239
- > Hash of data verified.
240
- > Leaving...
241
- > Hard resetting via RTS pin...
161
+ ` arduino-cli upload -p COM4 --fqbn esp8266:esp8266:nodemcuv2 cli-blink`
0 commit comments