Adding better docs + camera example.
This commit is contained in:
@ -151,7 +151,7 @@ ESP32_BOOT = common/boot.fs common/conditionals.fs common/vocabulary.fs \
|
||||
common/streams.fs posix/httpd.fs posix/web_interface.fs esp32/web_interface.fs \
|
||||
esp32/registers.fs esp32/timers.fs \
|
||||
esp32/bterm.fs posix/telnetd.fs \
|
||||
esp32/camera.fs common/blocks.fs \
|
||||
esp32/camera.fs esp32/camera_server.fs common/blocks.fs \
|
||||
esp32/autoboot.fs common/fini.fs
|
||||
$(GEN)/esp32_boot.h: common/source_to_string.js $(ESP32_BOOT) | $(GEN)
|
||||
echo "ok" | cat $(ESP32_BOOT) - | $< boot $(VERSION) $(REVISION) >$@
|
||||
@ -285,6 +285,7 @@ $(DEPLOY):
|
||||
|
||||
REPLACE = common/replace.js \
|
||||
COMMON=@site/common.html \
|
||||
POSIX_COMMON=@site/posix_common.html \
|
||||
DESKTOP_COMMON=@site/desktop_common.html \
|
||||
MENU=@site/menu.html \
|
||||
VERSION=${VERSION} \
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
( Handling for ESP32-CAM )
|
||||
|
||||
DEFINED? esp_camera_init [IF]
|
||||
|
||||
vocabulary camera camera definitions
|
||||
|
||||
29
ueforth/esp32/camera_server.fs
Normal file
29
ueforth/esp32/camera_server.fs
Normal file
@ -0,0 +1,29 @@
|
||||
( Camera Server )
|
||||
DEFINED? camera [IF]
|
||||
|
||||
vocabulary camera-server camera-server definitions
|
||||
also camera also httpd
|
||||
|
||||
: handle-image
|
||||
s" image/jpeg" ok-response
|
||||
esp_camera_fb_get dup dup @ swap cell+ @ send
|
||||
esp_camera_fb_return
|
||||
;
|
||||
|
||||
: handle1
|
||||
handleClient
|
||||
s" /image" path str= if handle-image exit then
|
||||
notfound-response
|
||||
;
|
||||
|
||||
: do-serve begin ['] handle1 catch drop pause again ;
|
||||
|
||||
: server ( port -- )
|
||||
server
|
||||
camera-config esp_camera_init throw
|
||||
do-serve
|
||||
;
|
||||
|
||||
only forth definitions
|
||||
|
||||
[THEN]
|
||||
@ -78,6 +78,7 @@ On boot, ESP32forth configures PIN 2 (typically an LED) to be an output and brin
|
||||
<h3>ESP32forth Specific Words</h3>
|
||||
|
||||
{{COMMON}}
|
||||
{{POSIX_COMMON}}
|
||||
|
||||
<h3>ESP32forth Bindings</h3>
|
||||
|
||||
@ -276,6 +277,14 @@ esp_camera_fb_return ( fb -- )
|
||||
esp_camera_sensor_get ( -- sensor )
|
||||
</pre>
|
||||
|
||||
<h5>Camera Server</h5>
|
||||
<b>WIP Prototype - Not yet stable</b>
|
||||
These words are inside the <code>camera-server</code> vocabulary.
|
||||
<pre>
|
||||
server ( port -- ) Start an image server at port,
|
||||
e.g. http://IP/image will produce an image
|
||||
</pre>
|
||||
|
||||
<h5>SD_MMC</h5>
|
||||
These words are inside the <code>SD_MMC</code> vocabulary.
|
||||
<pre>
|
||||
@ -448,7 +457,8 @@ Contact at port printed or via mDNS <a href="http://forth/">http://forth/</a>.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
webui ( network-z password-z -- )
|
||||
webui ( network-z password-z -- ) login and start webui
|
||||
login ( network-z password-z -- ) login to wifi only
|
||||
</pre>
|
||||
|
||||
<p>Usage:</p>
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
<h3>µEforth Specific Words</h3>
|
||||
|
||||
{{COMMON}}
|
||||
{{POSIX_COMMON}}
|
||||
|
||||
<h3>Linux</h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user