Skip to content

Commit cc68fbf

Browse files
matteosuppofacchinm
authored andcommitted
Upload docs
1 parent 1323486 commit cc68fbf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

upload/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use 'godoc cmd/github.com/arduino/arduino-create-agent/programmer' for documentation on the github.com/arduino/arduino-create-agent/programmer command
1+
use 'godoc cmd/github.com/arduino/arduino-create-agent/upload' for documentation on the github.com/arduino/arduino-create-agent/upload command
22

3-
Package programmer
3+
Package upload
44
=====================
55

6-
import "github.com/arduino/arduino-create-agent/programmer"
6+
import "github.com/arduino/arduino-create-agent/upload"
77

8-
Package programmer allows to upload sketches into a board connected to the
8+
Package upload allows to upload sketches into a board connected to the
99
computer It can do it via serial port or via network
1010

1111
**Usage for a serial upload**
@@ -14,7 +14,7 @@ Make sure that you have a compiled sketch somewhere on your disk
1414

1515
```go
1616
commandline = ``"/usr/bin/avrdude" "-C/usr/bin/avrdude.conf" -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D "-Uflash:w:./sketch.hex:i"``
17-
err := programmer.Serial("/dev/ttyACM0", commandline, programmer.Extra{}, nil)
17+
err := upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, nil)
1818
```
1919

2020
note that the commandline contains the path of the sketch (sketch.hex)
@@ -24,7 +24,7 @@ note that the commandline contains the path of the sketch (sketch.hex)
2424
Make sure that you have a compiled sketch somewhere on your disk
2525

2626
```go
27-
err := programmer.Network("127.0.10.120", "arduino:avr:yun, "./sketch.hex", "", programmer.Auth{}, nil)
27+
err := upload.Network("127.0.10.120", "arduino:avr:yun, "./sketch.hex", "", upload.Auth{}, nil)
2828
```
2929
3030
The commandline can be empty or it can contain instructions (depends on the
@@ -37,7 +37,7 @@ resolve it
3737
3838
```go
3939
t := tools.Tools{}
40-
commandline = programmer.Resolve("/dev/ttyACM0", "arduino:avr:leonardo", "./sketch.hex", commandline, programmer.Extra{}, t)
40+
commandline = upload.Resolve("/dev/ttyACM0", "arduino:avr:leonardo", "./sketch.hex", commandline, upload.Extra{}, t)
4141
```
4242
4343
t must implement the locater interface (the Tools package does!)
@@ -48,7 +48,7 @@ implement the logger interface. Here's an example:
4848
```go
4949
logger := logrus.New()
5050
logger.Level = logrus.DebugLevel
51-
programmer.Serial("/dev/ttyACM0", commandline, programmer.Extra{}, logger)
51+
upload.Serial("/dev/ttyACM0", commandline, upload.Extra{}, logger)
5252
```
5353
5454
@@ -60,7 +60,7 @@ Variables
6060
```go
6161
var Busy = false
6262
```
63-
Busy tells wether the programmer is doing something
63+
Busy tells wether the upload is doing something
6464
6565
Functions
6666
---------

0 commit comments

Comments
 (0)