-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforth.help.html.orig
More file actions
1745 lines (1238 loc) · 45.4 KB
/
forth.help.html.orig
File metadata and controls
1745 lines (1238 loc) · 45.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this template
-->
<html>
<head>
<title>ESP32Forth</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>Forth help</div>
<h1>General</h1>
These words ought to be compatible with any standard Forth.
<h2>DUP</H2>
Duplicate the TOS
<h3>Description</h3>
<h3>Examples</h3>
2 dup \ leaves (2 2) on the stack
<h2>SWAP</H2>
Swaps the two top-most items on the stack
<h3>Description</h3>
<h3>Examples</h3>
1 2 swap \ leaves (2 1) on the stack
<h2>OVER</H2>
Copies the second entry to the TOS
<h3>Description</h3>
<h3>Examples</h3>
1 2 over \ leaves ( 1 2 1 ) on the stack
<h2>ROT</H2>
Copies the third entry to the TOS
<h3>Description</h3>
<h3>Examples</h3>
1 2 3 rot \ leaves ( 2 3 1 ) on the stack
<h2>.</h2>
. ( n -- ) Print the number on the stack
<h3>Description</h3>
. will print the number on the stack according to the set number base.
<h3>Examples</h3>
10 . \ print the number 10
<h2>.s</h2>
Print the contents of the stack
<h3>Description</h3>
<h3>Examples</h3>
<h2 id='#create'>create</h2>
<p>CREATE new-word1</p>
<h3>Description</h3>
<p>CREATE takes the next (space-delimited) word from the input stream,
and creates a new dictionary item for it. </p>
<h3>Examples</h3>
CREATE new-word1
CREATE new-word2 1 cells allot \ reserve 1 cell - initial value undefined
CREATE new-word3 4 , \ reserve 1 cell and initialize it (to 4)
The variable can be examined and modified using @ (fetch) and ! (store) like this:
new-word2 @ . \ get address, fetch from it and display
1234 new-word2 ! \ new value, get address, store to it
\ Creating an array a of 5 cells, storing the number 17 in cell 1, then retrieving it
create a 5 cells allot \ a) create the 5 cell array
17 a 1 cells + ! \ b) Store the number 17 in cell 1
a 1 cells + @ . \ c) read and display the number stored in cell 1. (prints 17)
Array access could be simplified by defining getters and setters for the array.
: array create cells allot ; \ Factor a) above into a word
: array-put cells + ! ; \ Factor b) above into a word
: array-get cells + @ ; \ Factor c) above into a word
7 array b \ Create a 7 cell array named b. compare to a) above. Simple, non?
5 b 3 array-put \ put the number 5 in the 3rd cell
b 3 array-get . \ print the contents of array b's 3rd cell
<h3>See also</h3>
<a href='#does>'>Does></a>
Portions taken from the GFORTH manual
<h2 id='#does>'>does></h2>
<h3>Description</h3>
<h3>Examples</h3>
<h3>See also</h3>
<a href='#create'>Create</a>
<h2>0<</h2>
0< (n -- f) true if n less than 0, false otherwise
<h3>Description</h3>
Puts true on the stack if n is less than 0, puts false on the stack otherwise
<h3>Examples</h3>
Print "Yes" is 2 is less than 0, "No" otherwise<br><br>
2 0< [if] ." yes" [else] ." No" [then] <br>
No ok<br><br>
Print "Yes" if -12 is less than 0, "No" otherwise<br><br>
-12 0< [if] ." yes" [else] ." No" [then]<br>
yes ok<br>
<h1>Strings</h1>
Strings are stored as ( address length )
<pre>
Return the nth character of a string
: strnchr ( addr n i )
swap \ addr i n
drop \ addr i
+
@ \ c
255 and \ mask off hight byte
;
: strloop \ addr n xt
swap \ addr xt n
0 DO \ addr xt
2dup \ addr xt addr xt
swap \ addr xt xt addr
i + @ \ addr xt xt value
swap \ addr xt value xt
execute \ addr xt flag
IF exit THEN
LOOP
2drop \ remember to clean up the stack
;
\ IMO your source would clearer if you add a stack notation
\ The following version is also shorter.
: 2strloop ( adress-string lenght - adress-string )
2dup bounds do i @ emit cr loop drop ;
\ if you do not need the adress-string then it could be shorter:
: 3strloop ( adress-string lenght - )
bounds do i @ emit cr loop ;
Note: I often start with a stack notation before coding.
That feels like making a request to Forth.
</pre>
<h2>s"</h2>
Start a string
<h3>Description</h3>
s" takes one space, then a string, then a terminating "
<h3>Examples</h3>
<Pre>
Loop through all the characters of a string, printing a newline after each one.
: strloop 0 DO dup i + @ emit cr LOOP ;
s" atle" strloop
Factored into a word that takes a string and some arbitrary code and
distributes the code over the characters in the string
: strloop \ addr n xt
swap \ addr xt n
0 DO \ addr xt
2dup \ addr xt addr xt
swap \ addr xt xt addr
i + @ \ addr xt xt value
swap \ addr xt value xt
execute \
LOOP
2drop \ remember to clean up the stack
;
s" atle" ' emit strloop
atle ok
: lowcase 32 + emit ; \ simple lowercase
s" ATLE" ' lowcase strloop \ print lowercase string
atle ok
</Pre>
<h1>GPIO</h1>
Short GPIO Names : pin adc
<h2>pin</h2>
pin ( value pin# -- ) Set GPIO pin value
<h3>Description</h3>
Set pin pin# to value
<h3>Examples</h3>
0 2 pin \ turn off the blue LED
1000 ms \ leave it off for 1 second
1 2 pin \ turn the blue LED on again
<h2>adc</h2>
adc ( pin# -- n ) Analog read pin, result 0-1023
<h3>Description</h3>
<h3>Examples</h3>
<h2>digitalRead</h2>
digitalRead ( pin -- value) Read GPIO pin state
<h3>Description</h3>
<h3>Examples</h3>
\ read pin# 5 and leave the result on the stack
5 digitalRead
<h2>digitalWrite</h2>
digitalWrite ( pin value -- ) Set GPIO pin state
<h3>Description</h3>
<h3>Examples</h3>
2 0 digitalWrite \ turn off the blue LED
1000 ms \ leave it off for 1 second
2 1 digitalWrite \ turn the blue LED on again
<h2>pinmode</h2>
pinMode ( pin mode -- ) Set GPIO pin mode
<h3>Description</h3>
<h3>Examples</h3>
2 output pinmode \ set pin 2 to OUTPUT
<h2>analogRead</h2>
analogRead ( pin -- n ) Analog read from 0-4095
<h3>Description</h3>
<h3>Examples</h3>
<h2>pulseIn</h2>
pulseIn ( pin value usec -- usec/0 ) Wait for a pulse
<h3>Description</h3>
<h3>Examples</h3>
<h2>dacWrite</h2>
dacWrite ( pin 0-255 -- ) Write to DAC (pin 25, 26)
<h3>Description</h3>
<h3>Examples</h3>
<h1>Null Terminated Strings</h1>
As null terminated strings are used throughout C interfaces,
their use is supported in Forth by way of several non-standard words
with the convention of using Z/z to refer to such strings in names
and stack comment
<h2>Z"</h2>
Z" ( "string" -- z ) Creates a null terminated string on the heap
<h3>Description</h3>
<h3>Examples</h3>
<h2>Z>S</h2>
Z>S ( z -- a n ) Convert a null terminated string to a counted string
<h3>Description</h3>
<h3>Examples</h3>
<h2>S>Z</h2>
S>Z ( a n -- z ) Convert a counted string string to null terminated
(copies string to heap)
<h3>Description</h3>
<h3>Examples</h3>
<h1>Raw Strings</h1>
Raw strings are provided better support using a string for the duration
of the current command, without consuming heap memory.
<h2>R"</h2>
R" ( "string" -- a n ) Creates a temporary counted string
<h3>Description</h3>
<h3>Examples</h3>
<h2>R|</h2>
R| ( string| -- a n ) Creates a temporary counted string ending with |
<h3>Description</h3>
<h3>Examples</h3>
<h1>Utilities</h1>
<h2>DUMP</h2>
DUMP ( a n -- ) Dump a memory region
<h3>Description</h3>
<h3>Examples</h3>
<h2>SEE</h2>
SEE ( "name" -- ) Attempt to decompile a word
<h3>Description</h3>
<h3>Examples</h3>
see . \ : . base @ 10 XOR 0BRANCH u. EXIT str type space ;
<h2>ECHO</h2>
VARIABLE ECHO -- Determines if commands are echoed
<h3>Description</h3>
<h3>Examples</h3>
<h2></h2>
<h3>Description</h3>
<h3>Examples</h3>
<h1>Vocabularies</h1>
ESP32forth uses a hybrid of Forth-79 and Forth-83 style vocabularies. By default vocabularies chain to the vocabulary in which they were defined, as in Forth-79. However, like Forth-83, ALSO can be used to add vocabularies to a vocabulary stack of which CONTEXT @ is the first item. The word ONLY clears the vocabulary stack, but as there is no separate ONLY vocabulary, it also sets CONTEXT to the FORTH vocabulary. The word SEALED modifies the most recently defined vocabulary such that it does not chain. Note, this must be done before words are added to it.
<h2>VOCABULARY</h2>
VOCABULARY ( "name" ) Create a vocabulary with the current vocabulary as parent
<h3>Description</h3>
<h3>Examples</h3>
<h2>FORTH</h2>
FORTH ( -- ) Make the FORTH vocabulary the context vocabulary
<h3>Description</h3>
<h3>Examples</h3>
<h2>DEFINITIONS</h2>
DEFINITIONS ( -- ) Make the context vocabulary the current vocabulary
<h3>Description</h3>
<h3>Examples</h3>
<h2>VLIST</h2>
VLIST ( -- ) List the words in the context vocabulary (not chains)
<h3>Description</h3>
<h3>Examples</h3>
<h2>WORDS</h2>
WORDS ( -- ) List the words in the context vocabulary (including chains)
<h3>Description</h3>
<h3>Examples</h3>
<h2>TRANSFER</h2>
TRANSFER ( "name" ) Move a word from its current dictionary to the current vocabulary
<h3>Description</h3>
Useful for "hiding" built-in words
<h3>Examples</h3>
<h2>}TRANSFER</h2>
TRANSFER{ ..words.. }TRANSFER ( -- ) Transfer multiple words to the current vocabulary
<h3>Description</h3>
<h3>Examples</h3>
<h2>TRANSFER{</h2>
TRANSFER{ ..words.. }TRANSFER ( -- ) Transfer multiple words to the current vocabulary
<h3>Description</h3>
<h3>Examples</h3>
<h2>ALSO</h2>
ALSO ( -- ) Duplicate the vocabulary at the top of the vocabulary stack
<h3>Description</h3>
<h3>Examples</h3>
<h2>ONLY</h2>
ONLY ( -- ) Reset context stack to one item, the FORTH dictionary
Non-standard, as there's no distinct ONLY vocabulary
<h3>Description</h3>
<h3>Examples</h3>
<h2>ORDER</h2>
ORDER ( -- ) Print the vocabulary search order
<h3>Description</h3>
<h3>Examples</h3>
<h2>SEALED</h2>
SEALED ( -- ) Alter the last vocabulary defined so it doesn't chain
<h3>Description</h3>
<h3>Examples</h3>
<h1>Interpret Time Conditions</h1>
[I]F, [ELSE], and [THEN] can be used to selectively compile.
Used in tandem with DEFINED? they can be used to handle the absence of modules gracefully.
Nesting is supported.
<h2>DEFINED?</h2>
DEFINED? ( "name" -- xt|0 ) Check if a word exists (works at compile time too).
<h3>Description</h3>
<h3>Examples</h3>
<h2>[IF]</h2>
[IF] ( f -- ) Conditionally interpret the text the follows.
<h3>Description</h3>
<h3>Examples</h3>
<h2>[ELSE]</h2>
[ELSE] ( -- ) Interpret time ELSE.
<h3>Description</h3>
<h3>Examples</h3>
<h2>[THEN]</h2>
[THEN] ( -- ) Interpret time THEN.
<h3>Description</h3>
<h3>Examples</h3>
<h1>Blocks</h1>
<h2>USE</h2>
USE ( "name" -- ) Use "name" as the blockfile, e.g. USE /spiffs/foo
<h3>Description</h3>
<h3>Examples</h3>
<h2>OPEN-BLOCKS</h2>
OPEN-BLOCKS ( a n -- ) Open a file as the block file
<h3>Description</h3>
<h3>Examples</h3>
<h2>LOAD</h2>
LOAD ( n -- ) Evaluate a block
<h3>Description</h3>
<h3>Examples</h3>
<h2>THRU</h2>
THRU ( a b -- ) Load blocks a thru b
<h3>Description</h3>
<h3>Examples</h3>
<h2>LIST</h2>
LIST ( n -- ) List a block
<h3>Description</h3>
<h3>Examples</h3>
<h2>BLOCK</h2>
BLOCK ( n -- a ) Get a 1024 byte block
<h3>Description</h3>
<h3>Examples</h3>
<h2>BUFFER</h2>
BUFFER ( n -- a ) Get a 1024 byte block without regard to old contents
<h3>Description</h3>
<h3>Examples</h3>
<h2></h2>
UPDATE ( -- ) Mark the last block modified
<h3>Description</h3>
<h3>Examples</h3>
<h2>FLUSH</h2>
FLUSH ( -- ) Save and empty all buffers
<h3>Description</h3>
<h3>Examples</h3>
<h2>EMPTY-BUFFERS</h2>
EMPTY-BUFFERS ( -- ) Empty all buffers
<h3>Description</h3>
<h3>Examples</h3>
<h2>SAVE-BUFFERS</h2>
SAVE-BUFFERS ( -- ) Save all buffers
<h3>Description</h3>
<h3>Examples</h3>
<h2>SCR</h2>
SCR ( -- a ) Pointer to last listed block
<h3>Description</h3>
<h3>Examples</h3>
<h1>Block Editor</h1>
These words are available inside the EDITOR vocabulary. Note the block editor places newlines in the 63rd column of each line to make the block file readable in a text editor.
<h2>WIPE</h2>
WIPE ( -- ) Blank out the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>L</h2>
L ( -- ) List the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>D</h2>
D ( n -- ) Delete a line in the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>E</h2>
E ( n -- ) Clear a line in the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>R</h2>
R ( n "text" -- ) Replace a line in the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>A</h2>
A ( n "text" -- ) Add (insert) a line in the current block
<h3>Description</h3>
<h3>Examples</h3>
<h2>P</h2>
P ( -- ) Move to the previous block
<h3>Description</h3>
<h3>Examples</h3>
<h2>N</h2>
N ( -- ) Move to the next block
<h3>Description</h3>
<h3>Examples</h3>
<h1>Utilities</h1>
<h2>SEE</h2>
SEE ( "name" -- ) Attempt to decompile a word
<h3>Description</h3>
<h3>Examples</h3>
<h2>ECHO</h2>
ECHO ( -- a ) -- Address of flag that determines if commands are echoed
<h3>Description</h3>
<h3>Examples</h3>
<h1>ESP32forth Bindings</h1>
Because Arduino builds a statically linked image for flashing into ESP32 devices,
all C function bindings need to be explicitly added.
This is the current collection.
Typically to reduce confusion, function names have be preserved even through verbose.
In popular cases a shorted higher level name is provided.
See template.ino.
<h1>Allocation</h1>Allocation
These words are inside the internals vocabulary.
<h2>MALLOC</h2>
MALLOC ( n -- a | 0 ) System malloc
<h3>Description</h3>
<h3>Examples</h3>
<h2>SYSFREE</h2>
SYSFREE ( a -- ) System free
<h3>Description</h3>
<h3>Examples</h3>
<h2>REALLOC</h2>
REALLOC ( a n -- a | 0 ) System realloc
<h3>Description</h3>
<h3>Examples</h3>
<h1>Serial</h1>
These words are inside the Serial vocabulary.
<h2>Serial.begin</h2>
Serial.begin ( baud -- ) Start serial port
<h3>Description</h3>
<h3>Examples</h3>
<h2>Serial.end</h2>
Serial.end ( -- ) End serial port
<h3>Description</h3>
<h3>Examples</h3>
<h2>Serial.available</h2>
Serial.available ( -- f ) Is serial data available
<h3>Description</h3>
<h3>Examples</h3>
<h2>Serial.readBytes</h2>
Serial.readBytes ( a n -- n ) Read serial bytes, return number gotten
<h3>Description</h3>
<h3>Examples</h3>
<h2>Serial.write</h2>
Serial.write ( a n -- n ) Write serial bytes
<h3>Description</h3>
<h3>Examples</h3>
<h2>Serial.flush</h2>
Serial.flush ( -- ) Flush serial buffer
<h3>Description</h3>
<h3>Examples</h3>
<h1>Serial Bluetooth</h1>
These words are inside the bluetooth vocabulary.
<h2>SerialBT.new</h2>
SerialBT.new ( -- bt ) Allocate new BT object
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.delete</h2>
SerialBT.delete ( bt -- ) Free BT object
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.begin</h2>
SerialBT.begin ( localname ismaster bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.end</h2>
SerialBT.end ( bt -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.available</h2>
SerialBT.available ( bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.readBytes</h2>
SerialBT.readBytes ( a n bt -- n )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.write</h2>
SerialBT.write ( a n bt -- n )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.flush</h2>
SerialBT.flush ( bt -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.hasClient</h2>
SerialBT.hasClient ( bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.enableSSP</h2>
SerialBT.enableSSP ( bt -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.setPin</h2>
SerialBT.setPin ( z bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.unpairDevice</h2>
SerialBT.unpairDevice ( addr bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.connect</h2>
SerialBT.connect ( remotename bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.connectAddr</h2>
SerialBT.connectAddr ( addr bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.disconnect</h2>
SerialBT.disconnect ( bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.connected</h2>
SerialBT.connected ( timeout bt -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SerialBT.isReady</h2>
SerialBT.isReady ( checkMaster timeout -- f )
Default checkMaster=false, timeout=0
<h3>Description</h3>
<h3>Examples</h3>
<h1>Bluetooth</h1>
These words are inside the bluetooth vocabulary.
<h2>esp_bt_dev_get_address</h2>
esp_bt_dev_get_address ( -- a ) addr of 6 byte mac address
<h3>Description</h3>
<h3>Examples</h3>
<h1>ledc</h1>
These words are inside the ledc vocabulary.
<h2>ledcSetup</h2>
ledcSetup ( channel freq resolution -- freq )
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcAttachPin</h2>
ledcAttachPin ( pin channel -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcDetachPin</h2>
ledcDetachPin ( pin -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcRead</h2>
ledcRead ( channel -- n )
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcReadFreq</h2>
ledcReadFreq ( channel -- freq ) Get frequency (x 1,000,000)
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcWrite</h2>
ledcWrite ( channel duty -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcWriteTone</h2>
ledcWriteTone ( channel freq ) Write tone frequency (x 1000)
<h3>Description</h3>
<h3>Examples</h3>
<h2>ledcWriteNote</h2>
ledcWriteNote ( channel note octave -- freq )
<h3>Description</h3>
<h3>Examples</h3>
<h1>System</h1>
<h2>MS</h2>
MS ( n -- ) Pause for some number of milliseconds.
<h3>Description</h3>
<h3>Examples</h3>
<h2>MS-TICKS</h2>
MS-TICKS ( -- n ) Time since start in milliseconds.
<h3>Description</h3>
<h3>Examples</h3>
<h2>TERMINATE</h2>
TERMINATE ( n -- ) Call system exit.
<h3>Description</h3>
<h3>Examples</h3>
<h1>Files</h1>
<h2>R/O</h2>
R/O ( -- mode )
<h3>Description</h3>
<h3>Examples</h3>
<h2>R/W</h2>
R/W ( -- mode )
<h3>Description</h3>
<h3>Examples</h3>
<h2>W/O</h2>
W/O ( -- mode )
<h3>Description</h3>
<h3>Examples</h3>
<h2>BIN</h2>
BIN ( mode -- mode )
<h3>Description</h3>
<h3>Examples</h3>
<h2>CLOSE-FILE</h2>
CLOSE-FILE ( fh -- ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>OPEN-FILE</h2>
OPEN-FILE ( a n mode -- fh ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>CREATE-FILE</h2>
CREATE-FILE ( a n mode -- fh ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>DELETE-FILE</h2>
DELETE-FILE ( a n -- ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>WRITE-FILE</h2>
WRITE-FILE ( a n fh -- ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>READ-FILE</h2>
READ-FILE ( a n fh -- n ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>FILE-POSITION</h2>
FILE-POSITION ( fh -- n ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>REPOSITION-FILE</h2>
REPOSITION-FILE ( n fh -- ior )
<h3>Description</h3>
<h3>Examples</h3>
<h2>FILE-SIZE</h2>
FILE-SIZE ( fh -- n ior )
<h3>Description</h3>
<h3>Examples</h3>
<h1>WiFi</h1>
These words are inside the WiFi vocabulary.
<h3>Description</h3>
<h3>Examples</h3>
WiFi.config ( ip dns gateway subnet -- ) Packaged a.b.c.d little-endian
<h3>Description</h3>
<h3>Examples</h3>
Wifi.begin ( ssid-z password-z -- )
<h3>Description</h3>
<h3>Examples</h3>
Wifi.disconnect ( -- )
<h3>Description</h3>
<h3>Examples</h3>
WiFi.status ( -- n )
<h3>Description</h3>
<h3>Examples</h3>
WiFi.macAddress ( a -- )
<h3>Description</h3>
<h3>Examples</h3>
WiFi.localIP ( -- ip )
<h3>Description</h3>
<h3>Examples</h3>
WiFi.mode ( mode -- ) WIFI_MODE_NULL WIFI_MODE_STA WIFI_MODE_AP WIFI_MODE_APSTA
<h3>Description</h3>
<h3>Examples</h3>
WiFi.setTxPower ( powerx4 -- ) Set power x4
<h3>Description</h3>
<h3>Examples</h3>
WiFi.getTxPower ( -- powerx4 ) Get power x4
<h3>Description</h3>
<h3>Examples</h3>
<h1>mDNS</h1>mDNS
<h2>MDNS.begin</h2>
MDNS.begin ( name-z -- ) Start multicast dns
<h3>Description</h3>
<h3>Examples</h3>
<h1>SPIFFS</h1>
These words are inside the SPIFFS vocabulary.
<h2>SPIFFS.begin</h2>
SPIFFS.begin ( format-on-fail path-z max-files -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SPIFFS.end</h2>
SPIFFS.end ( -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SPIFFS.format</h2>
SPIFFS.format ( -- f )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SPIFFS.totalBytes</h2>
SPIFFS.totalBytes ( -- n )
<h3>Description</h3>
<h3>Examples</h3>
<h2>SPIFFS.usedBytes</h2>
SPIFFS.usedBytes ( -- n )
<h3>Description</h3>
<h3>Examples</h3>
<h1>WebServer</h1>
These words are inside the WebServer vocabulary.
<h2>WebServer.new</h2>
WebServer.new ( port -- ws ) Allocate new webserver object
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.delete</h2>
WebServer.delete ( ws -- ) Delete webserver object
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.begin</h2>
WebServer.begin ( port ws -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.stop</h2>
WebServer.stop ( ws -- )
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.on</h2>
WebServer.on ( path-z xt ws -- ) Set up a web path handle callback
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.handleClient</h2>
WebServer.handleClient ( ws -- ) Handle one client request
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.hasArg</h2>
WebServer.hasArg ( z ws -- f ) By name
<h3>Description</h3>
<h3>Examples</h3>
<h2>WebServer.arg</h2>
WebServer.arg ( z ws -- z ) By name
<h3>Description</h3>
<h3>Examples</h3>