diff --git a/ueforth/arduino/arduino.template.ino b/ueforth/arduino/arduino.template.ino index 532f1d8..683d754 100644 --- a/ueforth/arduino/arduino.template.ino +++ b/ueforth/arduino/arduino.template.ino @@ -75,6 +75,8 @@ Y(digitalWrite, digitalWrite(n1, n0); DROPn(2)) \ Y(digitalRead, n0 = digitalRead(n0)) \ Y(analogRead, n0 = analogRead(n0)) \ + Y(pulseIn, n0 = pulseIn(n2, n1, n0); NIPn(2)) \ + Y(dacWrite, dacWrite(n1, n0); DROPn(2)) \ Y(ledcSetup, \ n0 = (cell_t) (1000000 * ledcSetup(n2, n1 / 1000.0, n0)); NIPn(2)) \ Y(ledcAttachPin, ledcAttachPin(n1, n0); DROPn(2)) \ diff --git a/ueforth/site/ESP32forth.html b/ueforth/site/ESP32forth.html index 623dac7..00edc3d 100644 --- a/ueforth/site/ESP32forth.html +++ b/ueforth/site/ESP32forth.html @@ -145,6 +145,8 @@ esp_bt_dev_get_address ( -- a ) addr of 6 byte mac address pinMode ( pin mode -- ) Set GPIO pin mode digitalWrite ( pin value -- ) Set GPIO pin state analogRead ( pin -- n ) Analog read from 0-4095 +pulseIn ( pin value usec -- usec/0 ) Wait for a pulse +dacWrite ( pin 0-255 -- ) Write to DAC (pin 25, 26)
ledc