Check-in [288fe3fb5b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update tfirmata doc
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 288fe3fb5b23669339b03d2f1a968a53951ccdaa
User & Date: chw 2019-05-22 19:42:52.953
Context
2019-05-24
09:37
improved topcua example from [2d7bf2f037] check-in: 9dc5a09111 user: chw tags: trunk
2019-05-22
19:42
update tfirmata doc check-in: 288fe3fb5b user: chw tags: trunk
05:11
tweak undroidwish build for openbsd 6.5 check-in: 1554a23454 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to assets/tfirmata/doc/styles.css.
1
2
3
4
5
6
7
8
9
10
11
12

body { 
  font-family: sans-serif;
  font-size: 10pt;
  max-width: 45em; 
  margin-left: auto;
  margin-right: auto;
} 

h1 {
  font-size: 120%;
}




|







1
2
3
4
5
6
7
8
9
10
11
12

body { 
  font-family: sans-serif;
  font-size: 10pt;
  max-width: 55em; 
  margin-left: auto;
  margin-right: auto;
} 

h1 {
  font-size: 120%;
}
Changes to assets/tfirmata/doc/tfirmata.html.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
host, to control Arduino hardware, can be written in any language that the 
host system supports, including high level scripting languages such as Tcl.
</p>

<p>
The StandardFirmata project, which is included with the Arduino IDE, 
implements the Firmata protocol. An Arduino can be programmed with 
StandardFirmata, and then controlled from scripts running on a PC, for a quick 
and easy method of controlling hardware. See the
<a href="https://github.com/pdt/tfirmata/tree/master/examples">examples</a>
directory for a range of small but complete examples, including for:

<ul>
<li>
reading
<a href="https://github.com/pdt/tfirmata/tree/master/examples/inputs.tcl">
digital inputs</a>
</li>
<li>
writing
<a href="https://github.com/pdt/tfirmata/tree/master/examples/blink2.tcl">
digital outputs</a>
</li>
<li>
reading
<a href="https://github.com/pdt/tfirmata/tree/master/examples/analog.tcl">
analog inputs</a>
</li>
<li>
setting
<a href="https://github.com/pdt/tfirmata/tree/master/examples/pwm.tcl">
analog pwm outputs</a>
</li>
<li>
reading from a
<a href="https://github.com/pdt/tfirmata/tree/master/examples/twi_temp.tcl">
TWI temperature sensor</a> 
</li>
<li>
writing to 
<a href="https://github.com/pdt/tfirmata/tree/master/examples/twi_dac.tcl">
TWI DAC outputs</a> 
</li>
<li>
controlling
<a href="https://github.com/pdt/tfirmata/tree/master/examples/servo.tcl">
servo motor position</a> 
</li>
<li>
controlling and reading back
<a href="https://github.com/pdt/tfirmata/tree/master/examples/gui.tcl">
digital/analog I/O with a GUI</a> 
</li>
</ul>
</p>

<p>
tfirmata is a complete implementation of Firmata, including board capability
querying. As a result tfirmata should work with all boards supported 
by Firmata.
</p>








|
|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







26
27
28
29
30
31
32
33
34
35

36











































37
38
39
40
41
42
43
host, to control Arduino hardware, can be written in any language that the 
host system supports, including high level scripting languages such as Tcl.
</p>

<p>
The StandardFirmata project, which is included with the Arduino IDE, 
implements the Firmata protocol. An Arduino can be programmed with 
StandardFirmata, and then controlled from scripts running on a PC,
for a quick and easy method of controlling hardware. See the
<a href="https://wiki.tcl-lang.org/page/Firmata">Firmata</a> page in

the Tcl'ers Wiki for more information and references to examples.












































<p>
tfirmata is a complete implementation of Firmata, including board capability
querying. As a result tfirmata should work with all boards supported 
by Firmata.
</p>

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<div class="codebox">
<pre>
package require tfirmata

set bd [tfirmata::open /dev/ttyUSB0]
$bd mode 13 out

while 1 {
    $bd dset 13 1
    tfirmata::sleep 250
    $bd dset 13 0
    tfirmata::sleep 250
}
</pre>
</div>







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<div class="codebox">
<pre>
package require tfirmata

set bd [tfirmata::open /dev/ttyUSB0]
$bd mode 13 out

while {1} {
    $bd dset 13 1
    tfirmata::sleep 250
    $bd dset 13 0
    tfirmata::sleep 250
}
</pre>
</div>
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<li><code>stepconfig num delay interface stepsPerRevolution pin1 pin2 ?pin3 pin4?</code></li>
<li><code>stepoff num</code></li>
<li><code>step num steps speed ?acceleration? ?deceleration?</code></li>
<li><code>stepwait ?mask? ?milliseconds?</code></li>
<li><code>eattach num pin1 pin2</code></li>
<li><code>equery ?num?</code></li>
<li><code>ereset num</code></li>
<li><code>ereport`flag</code></li>
<li><code>ecommand command</code></li>
<li><code>edetach num</code></li>
<li><code>eget num</code></li>
<li><code>serconfig num baud ?pinRX pinTX?</code></li>
<li><code>sercommand command</code></li>
<li><code>serwrite num data</code></li>
<li><code>serread num ?stop maxRead?</code></li>







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<li><code>stepconfig num delay interface stepsPerRevolution pin1 pin2 ?pin3 pin4?</code></li>
<li><code>stepoff num</code></li>
<li><code>step num steps speed ?acceleration? ?deceleration?</code></li>
<li><code>stepwait ?mask? ?milliseconds?</code></li>
<li><code>eattach num pin1 pin2</code></li>
<li><code>equery ?num?</code></li>
<li><code>ereset num</code></li>
<li><code>ereport flag</code></li>
<li><code>ecommand command</code></li>
<li><code>edetach num</code></li>
<li><code>eget num</code></li>
<li><code>serconfig num baud ?pinRX pinTX?</code></li>
<li><code>sercommand command</code></li>
<li><code>serwrite num data</code></li>
<li><code>serread num ?stop maxRead?</code></li>
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
    $bd1 dset 13 0
    $bd2 dset 13 1
    tfirmata::sleep 250
}
</pre>
</div>

<h2>Download</h2>

<p>
tfirmata can be downloaded from 
<a href="https://github.com/pdt/tfirmata">here</a>.
</p>

<div id="separator"></div>

<div id="footer">
Copyright &copy 2013 Paul Taylor, Firmata 2.5 additions by Christian Werner
<div>

</body>
</html>







<
<
<
<
<
<
<








810
811
812
813
814
815
816







817
818
819
820
821
822
823
824
    $bd1 dset 13 0
    $bd2 dset 13 1
    tfirmata::sleep 250
}
</pre>
</div>








<div id="separator"></div>

<div id="footer">
Copyright &copy 2013 Paul Taylor, Firmata 2.5 additions by Christian Werner
<div>

</body>
</html>