Skip to content

Commit e1dcae7

Browse files
committed
fix format
1 parent 4cc603b commit e1dcae7

File tree

1 file changed

+27
-107
lines changed

1 file changed

+27
-107
lines changed

README.md

Lines changed: 27 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ New sketch can be created in current folder by the command:
3535

3636
eg:
3737

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:\projects\cli-blink
41+
```
4042

4143
A folder with `.ino` file will be create for you.
4244

@@ -48,9 +50,11 @@ You can open this file in you favorite IDE or text editor.
4850

4951
`arduino-cli board list`
5052

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+
```
5458

5559
## Compile and upload the sketch
5660

@@ -86,9 +90,11 @@ Run the following command to compile the sketch
8690

8791
and you will get output like
8892

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+
```
9298

9399
- If you get any error like
94100

@@ -100,79 +106,14 @@ and you will get output like
100106

101107
`arduino-cli board listall`
102108

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-
168109
### Upload the sketch
169110

170111
- Use the command:
171112
`arduino-cli upload -p YourBoardPort --fqbn YourBoardFQBN YourSketchName`
172113

173114
- To compile sketch called `cli-blink` for `Arduino Nano` connected in Port `COM3` run the following command:
174115

175-
`arduino-cli upload -p COM3 --fqbn arduino:avr:nano cli-blink`
116+
`arduino-cli upload -p COM3 --fqbn arduino:avr:nano cli-blink`
176117

177118
## Install 3rd party cores.
178119

@@ -183,8 +124,11 @@ and you will get output like
183124
- Create a configuration file if it doesn't exist by the command:
184125
`arduino-cli config init`
185126

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:\Users\B45i\AppData\Local\Arduino15\arduino-cli.
130+
yaml
131+
```
188132

189133
- Open the configuration file in any editor and add new board manger url to `board_manager > additional_urls`.
190134

@@ -200,42 +144,18 @@ board_manager:
200144
- now update the core by command:
201145
`arduino-cli core update-index`
202146

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+
```
206152

207153
- If you do `arduino-cli core search esp8266` you can see esp8266 listed.
208154

209155
- Compile code for nodeMCU:
210156

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`
220158

221159
- Upload to nodeMCU connected on `COM4`:
222160

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

Comments
 (0)