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
2
2
3
- Package programmer
3
+ Package upload
4
4
=====================
5
5
6
- import "github.com/arduino/arduino-create-agent/programmer "
6
+ import "github.com/arduino/arduino-create-agent/upload "
7
7
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
9
9
computer It can do it via serial port or via network
10
10
11
11
** Usage for a serial upload**
@@ -14,7 +14,7 @@ Make sure that you have a compiled sketch somewhere on your disk
14
14
15
15
``` go
16
16
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 )
18
18
```
19
19
20
20
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)
24
24
Make sure that you have a compiled sketch somewhere on your disk
25
25
26
26
``` 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)
28
28
```
29
29
30
30
The commandline can be empty or it can contain instructions (depends on the
@@ -37,7 +37,7 @@ resolve it
37
37
38
38
```go
39
39
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)
41
41
```
42
42
43
43
t must implement the locater interface (the Tools package does!)
@@ -48,7 +48,7 @@ implement the logger interface. Here's an example:
48
48
```go
49
49
logger := logrus.New()
50
50
logger.Level = logrus.DebugLevel
51
- programmer .Serial(" /dev/ttyACM0" , commandline, programmer .Extra{}, logger)
51
+ upload .Serial(" /dev/ttyACM0" , commandline, upload .Extra{}, logger)
52
52
```
53
53
54
54
@@ -60,7 +60,7 @@ Variables
60
60
```go
61
61
var Busy = false
62
62
```
63
- Busy tells wether the programmer is doing something
63
+ Busy tells wether the upload is doing something
64
64
65
65
Functions
66
66
---------
0 commit comments