From 13ca4f7f7a076b1467881e9e1742e4c753928076 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 13 Feb 2021 06:55:20 -0800 Subject: [PATCH] Adding missed file. --- ueforth/arduino/arduino_bterm.fs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ueforth/arduino/arduino_bterm.fs diff --git a/ueforth/arduino/arduino_bterm.fs b/ueforth/arduino/arduino_bterm.fs new file mode 100644 index 0000000..a517076 --- /dev/null +++ b/ueforth/arduino/arduino_bterm.fs @@ -0,0 +1,15 @@ +( Lazy loaded Bluetooth Serial Terminal ) + +: bterm r| +vocabulary bterm bterm definitions +also bluetooth also internals +SerialBT.new constant bt +z" forth" 0 bt SerialBT.begin . +esp_bt_dev_get_address hex 6 dump cr +: bt-type bt SerialBT.write drop ; +: bt-key + begin bt SerialBT.available until 0 >r rp@ 1 bt SerialBT.readBytes drop r> ; +: bt-on ['] bt-type is type ['] bt-key is key ; +: bt-off ['] arduino-type is type ['] arduino-key is key ; +only forth definitions +| evaluate ;