Skip to content

[skip ci] [skip changelog] Update README.md getting started instructions to the latest "sketch new" command behavior #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ IDE has without the graphical UI.

### Step 1. Create a new sketch

The command will create a new empty sketch named MyFirstSketch in the default directory under \$HOME/Arduino/
The command will create a new empty sketch named `MyFirstSketch` in the current directory

```console
$ arduino-cli sketch new MyFirstSketch
Sketch created in: /home/luca/Arduino/MyFirstSketch
Sketch created in: /home/luca/MyFirstSketch

$ cat /home/luca/Arduino/MyFirstSketch/MyFirstSketch.ino
$ cat /home/luca/MyFirstSketch/MyFirstSketch.ino
void setup() {
}

Expand All @@ -106,7 +106,8 @@ void loop() {

### Step 2. Modify your sketch

Use your favourite file editor or IDE to modify the .ino file under: `$HOME/Arduino/MyFirstSketch/MyFirstSketch.ino`
Use your favourite file editor or IDE to modify the .ino file, in this example
under: `$HOME/MyFirstSketch/MyFirstSketch.ino`
and change the file to look like this one:

```C
Expand Down Expand Up @@ -237,7 +238,7 @@ To compile the sketch we have to run the `compile` command with the proper FQBN
previous command.

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

Expand All @@ -247,7 +248,7 @@ We can finally upload the sketch and see our board blinking, we now have to spec
used by our board other than the FQBN:

```console
$ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch
$ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 MyFirstSketch
No new serial port detected.
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Expand Down