Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:42 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Remote logging using MMB4W and the WebMite

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9133
Posted: 06:13pm 22 Apr 2023
Copy link to clipboard 
Print this post

I have just implemented a simple Telnet client in MMB4W. This allows you to talk to the Web version of the PicoMite (WebMite) over the internet all without leaving Basic.
I've also implemented OPTION ESCAPE to make things even easier.
In the example I just list a file remotely but you could execute a program, and read the output or enter commands at the command prompt to do things like read an analogue voltage

MMB4W V5.07.03b16

MMBasic.zip

e.g.


option escape ' turn on escape codes
telnet client open "192.168.1.147",23 ' open a telnet connection to the Webmite
telnet send "list all \qsolar_eclipse.bas\q\r\n" 'send any sort of command to the Webmite
timer=0
do
telnet receive s$ 'read anything the Webmite has returned
if len(s$) then
print s$;
timer=0
endif
loop until timer>100
telnet close 'close the telnet connection



Edited 2023-04-23 04:15 by matherp
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024