-->
Page 1 of 1

Documentation comments - as requested

PostPosted: Sun Sep 11, 2016 11:24 am
by bugs
OK - since you asked - I'll stick my neck out with the first comments...

udp doc slightly inconsistent as to able to use variables or not:-

ip$="192.168.0.141"
udpwrite ip$, 8888, msg$
' works

port = 8888
udpwrite ip$, port, msg$
' does not work - no error

.................................................

post #50329 mentions mqtt - not in docs yet.

...............................................

READ():
there seems to be some unspecified limitation on file name and location
tested with 4 files with variations in name and location
/data/fred
/data/fred.txt
/data/fred.dat
/uploads/fred.dat

Code: Select alla$=read("fred")
serialprintln a$
                                  'prints contents of the file /data/fred.dat

a$=read("/data/fred.dat")
serialprintln a$
                                  'prints nothing

a$=read("/data/fred")
serialprintln a$
                                  'prints nothing

a$=read("fred.txt")
serialprintln a$
                                   'prints nothing

a$=read("/data/fred.txt")
serialprintln a$
                                  'prints nothing

a$=read("/uploads/fred.dat")
serialprintln a$
                                  'prints nothing

.........................................
looks like it MUST be in the /data/ directory and MUST have a .dat extension but you MUST NOT specify the path or extention.

:|

Re: Documentation comments - as requested

PostPosted: Sun Sep 11, 2016 12:24 pm
by forlotto
now that is useful information!

We really need more examples like this to make use of more complex forms of automation. Storing information locally on the ESP and placing that information into an array through the use of a read command I would bet most folks did not know it was possible.

Now what would be interesting is if you could change each line with user input.

Would love to see an example of this.

From there we can deduce how to create a local input output buffer of data in and out to be stored as an array then executed.

Makes me wonder if there is a maximum amount of dat files that can be uploaded?