Document pin commands
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
' arduino-key is key
|
' arduino-key is key
|
||||||
|
|
||||||
( Map Arduino / ESP32 things to shorter names. )
|
( Map Arduino / ESP32 things to shorter names. )
|
||||||
: pin ( n n -- ) swap digitalWrite ;
|
: pin ( n pin# -- ) swap digitalWrite ;
|
||||||
: adc ( n -- n ) analogRead ;
|
: adc ( n -- n ) analogRead ;
|
||||||
: duty ( n n -- ) 255 min 8191 255 */ ledcWrite ;
|
: duty ( n n -- ) 255 min 8191 255 */ ledcWrite ;
|
||||||
: freq ( n n -- ) 1000 * 13 ledcSetup drop ;
|
: freq ( n n -- ) 1000 * 13 ledcSetup drop ;
|
||||||
|
|||||||
@ -203,6 +203,12 @@ ledcWriteTone ( channel freq ) Write tone frequency (x 1000)
|
|||||||
ledcWriteNote ( channel note octave -- freq )
|
ledcWriteNote ( channel note octave -- freq )
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h5>Short GPIO Names</h5>
|
||||||
|
<pre>
|
||||||
|
pin ( value pin# -- ) Set GPIO pin value
|
||||||
|
adc ( pin# -- n ) Analog read pin, result 0-1023
|
||||||
|
</pre>
|
||||||
|
|
||||||
<h5>System</h5>
|
<h5>System</h5>
|
||||||
<pre>
|
<pre>
|
||||||
MS ( n -- )
|
MS ( n -- )
|
||||||
|
|||||||
Reference in New Issue
Block a user