@@ -121,7 +121,79 @@ We can finally chek if the board is now recognized as a MKR1000
121
121
Great! Now the Board FQBN (Fully Qualified Board Name) and the Board Name look good, we are ready to compile and upload the sketch
122
122
123
123
### Step 5. Compile the sketch
124
- To compile the sketch we have to
124
+ To compile the sketch we have to run the ` compile ` command with the proper FQBN we just got in the previous command.
125
+
126
+ arduino-cli compile --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch
127
+ Sketch uses 9600 bytes (3%) of program storage space. Maximum is 262144 bytes.
128
+
129
+ ### Step 6. Upload your sketch
130
+ 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:
131
+
132
+ $ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch
133
+ No new serial port detected.
134
+ Atmel SMART device 0x10010005 found
135
+ Device : ATSAMD21G18A
136
+ Chip ID : 10010005
137
+ Version : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
138
+ Address : 8192
139
+ Pages : 3968
140
+ Page Size : 64 bytes
141
+ Total Size : 248KB
142
+ Planes : 1
143
+ Lock Regions : 16
144
+ Locked : none
145
+ Security : false
146
+ Boot Flash : true
147
+ BOD : true
148
+ BOR : true
149
+ Arduino : FAST_CHIP_ERASE
150
+ Arduino : FAST_MULTI_PAGE_WRITE
151
+ Arduino : CAN_CHECKSUM_MEMORY_BUFFER
152
+ Erase flash
153
+ done in 0.784 seconds
154
+
155
+ Write 9856 bytes to flash (154 pages)
156
+ [==============================] 100% (154/154 pages)
157
+ done in 0.069 seconds
158
+
159
+ Verify 9856 bytes of flash with checksum.
160
+ Verify successful
161
+ done in 0.009 seconds
162
+ CPU reset.
163
+
164
+ ### Step 7. Add libraries
165
+ 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
166
+
167
+ $ arduino-cli lib search wifi101
168
+ Name: "WiFi101OTA"
169
+ Author: Arduino
170
+ Maintainer: Arduino <[email protected] >
171
+ Sentence: Update sketches to your board over WiFi
172
+ Paragraph: Requires an SD card and SAMD board
173
+ Website: http://www.arduino.cc/en/Reference/WiFi101OTA
174
+ Category: Other
175
+ Architecture: samd
176
+ Types: Arduino
177
+ Versions: [1.0.2, 1.0.0, 1.0.1]
178
+ Name: "WiFi101"
179
+ Author: Arduino
180
+ Maintainer: Arduino <[email protected] >
181
+ Sentence: Network driver for ATMEL WINC1500 module (used on Arduino/Genuino Wifi Shield 101 and MKR1000 boards)
182
+ Paragraph: This library implements a network driver for devices based on the ATMEL WINC1500 wifi module
183
+ Website: http://www.arduino.cc/en/Reference/WiFi101
184
+ Category: Communication
185
+ Architecture: *
186
+ Types: Arduino
187
+ Versions: [0.5.0, 0.6.0, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.15.2, 0.8.0, 0.9.0, 0.12.1, 0.14.1, 0.14.4, 0.14.5, 0.15.1, 0.7.0, 0.14.0, 0.14.2, 0.14.3, 0.9.1, 0.13.0, 0.15.0, 0.5.1]
188
+
189
+ We are now ready to install it! Please be sure to use the full name of the lib as specified in the "Name:" section previously seen
190
+
191
+ $ arduino-cli lib install "WiFi101"
192
+ Downloading libraries...
193
+
194
+
195
+
196
+ ## Inline Help
125
197
126
198
` arduino-cli ` is a container of commands, to see the full list just run:
127
199
``` bash
0 commit comments