Skip to content

Commit 6eb7f2d

Browse files
committed
Some minor changes to readme
1 parent 494bc94 commit 6eb7f2d

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Once downloaded, place the executable into a directory which is in your `PATH` e
3030

3131
### Build the latest "bleeding-edge" from source
3232

33-
* You should have a recent Go compiler installed.
34-
* Run `go get -u github.com/arduino/arduino-cli`
35-
* The `arduino-cli` executable will be produced in `$GOPATH/bin/arduino-cli`
33+
- You should have a recent Go compiler installed.
34+
- Run `go get -u github.com/arduino/arduino-cli`
35+
- The `arduino-cli` executable will be produced in `$GOPATH/bin/arduino-cli`
3636

3737
You may want to copy the executable into a directory which is in your `PATH` environment variable
3838
(such as `/usr/local/bin/`).
@@ -45,7 +45,8 @@ The Arduino CLI aims to replace the majority of features the Arduino IDE has wit
4545
## Getting Started
4646

4747
### Step 1. Create a new sketch
48-
The command will create a new empty sketch named MyFirstSketch in the default directory under $HOME/Arduino/
48+
49+
The command will create a new empty sketch named MyFirstSketch in the default directory under \$HOME/Arduino/
4950

5051
$ arduino-cli sketch new MyFirstSketch
5152
Sketch created in: /home/luca/Arduino/MyFirstSketch
@@ -58,6 +59,7 @@ The command will create a new empty sketch named MyFirstSketch in the default di
5859
}
5960

6061
### Step 2. Modify your sketch
62+
6163
Use your favourite file editor or IDE to modify the .ino file under: `$HOME/Arduino/MyFirstSketch/MyFirstSketch.ino`
6264
and change the file to look like this one:
6365

@@ -73,6 +75,7 @@ and change the file to look like this one:
7375
}
7476

7577
### Step 3. Connect the board to your PC
78+
7679
If you are running a fresh install of the arduino-cli you probably need to update the platform indexes by running:
7780

7881
$ arduino-cli core update-index
@@ -139,7 +142,6 @@ Now verify we have installed the core properly by running
139142
ID Installed Latest Name
140143
arduino:samd 1.6.19 1.6.19 Arduino SAMD Boards (32-bits ARM Cortex-M0+)
141144

142-
143145
We can finally check if the board is now recognized as a MKR1000
144146

145147
$ arduino-cli board list
@@ -162,25 +164,29 @@ Great! Now we have the Board FQBN (Fully Qualified Board Name) `arduino:samd:mkr
162164
and the Board Name look good, we are ready to compile and upload the sketch
163165

164166
#### Adding 3rd party cores
165-
To add 3rd party core packages add a link of the additional package to the file `.cli-config.yml`
167+
168+
To add 3rd party core packages add a link of the additional package to the file `.cli-config.yml`
166169

167170
If you want to add the ESP8266 core, for example:
168171

169172
board_manager:
170173
additional_urls:
171174
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
175+
172176
And then run:
173-
174-
arduino-cli core update-index
175-
arduino-cli core install esp8266:esp8266
177+
178+
arduino-cli core update-index
179+
arduino-cli core install esp8266:esp8266
176180

177181
### Step 5. Compile the sketch
182+
178183
To compile the sketch we have to run the `compile` command with the proper FQBN we just got in the previous command.
179184

180185
$ arduino-cli compile --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch
181186
Sketch uses 9600 bytes (3%) of program storage space. Maximum is 262144 bytes.
182187

183188
### Step 6. Upload your sketch
189+
184190
We can finally upload the sketch and see our board blinking, we now have to specify the serial port used by our board other than the FQBN:
185191

186192
$ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch
@@ -216,6 +222,7 @@ We can finally upload the sketch and see our board blinking, we now have to spec
216222
CPU reset.
217223

218224
### Step 7. Add libraries
225+
219226
Now we can try to add a useful library to our sketch. We can at first look at the name of a library, our favourite one is the wifi101, here the command to get more info
220227

221228
$ arduino-cli lib search wifi101
@@ -250,6 +257,7 @@ We are now ready to install it! Please be sure to use the full name of the lib a
250257
## Inline Help
251258

252259
`arduino-cli` is a container of commands, to see the full list just run:
260+
253261
```bash
254262
$ arduino-cli
255263
Arduino Command Line Interface (arduino-cli).
@@ -318,11 +326,10 @@ Because:
318326

319327
#### What is the FQBN for ...?
320328

321-
* Arduino UNO: `arduino:avr:uno`
322-
* Arduino Mega: `arduino:avr:mega`
323-
* Arduino Nano: `arduino:avr:nano` or `arduino:avr:nano:cpu=atmega328old` if you have the old bootloader
329+
- Arduino UNO: `arduino:avr:uno`
330+
- Arduino Mega: `arduino:avr:mega`
331+
- Arduino Nano: `arduino:avr:nano` or `arduino:avr:nano:cpu=atmega328old` if you have the old bootloader
324332

325333
#### How can I find the core/FQBN for a board?
326334

327335
See: https://github.com/arduino/arduino-cli#step-4-find-and-install-the-right-core
328-

0 commit comments

Comments
 (0)