diff --git a/ueforth/arduino/arduino.fs b/ueforth/arduino/arduino.fs index 7141ac5..32e9dd8 100644 --- a/ueforth/arduino/arduino.fs +++ b/ueforth/arduino/arduino.fs @@ -9,7 +9,7 @@ ' arduino-key is key ( Map Arduino / ESP32 things to shorter names. ) -: pin ( n n -- ) swap digitalWrite ; +: pin ( n pin# -- ) swap digitalWrite ; : adc ( n -- n ) analogRead ; : duty ( n n -- ) 255 min 8191 255 */ ledcWrite ; : freq ( n n -- ) 1000 * 13 ledcSetup drop ; diff --git a/ueforth/site/index.html b/ueforth/site/index.html index b1a89ab..55be485 100644 --- a/ueforth/site/index.html +++ b/ueforth/site/index.html @@ -203,6 +203,12 @@ ledcWriteTone ( channel freq ) Write tone frequency (x 1000) ledcWriteNote ( channel note octave -- freq ) +
+pin ( value pin# -- ) Set GPIO pin value +adc ( pin# -- n ) Analog read pin, result 0-1023 ++
MS ( n -- )