I'm trying to use the serial port on a Wemos D1 Mini.
The two problems I have are..
(1) Extracting the data from the received message
(2) Trying to find a way of sending data/variable from the Wemos via the serial port
Note:
I'm using the very latest version of ESP Easy mega 20190202 release.
Any help or guidance would be greatly appreciated.
Kind regards from David.
Serial port
Moderators: grovkillen, Stuntteam, TD-er
- dynamicdave
- Normal user
- Posts: 257
- Joined: 30 Jan 2017, 20:25
- Location: Hampshire, UK
Re: Serial port
(1)
I think data extraction will be difficult.
Is not it better to send data in a correct format?:
viewtopic.php?t=4884
(2)
serialsend
Look at post from "mikeluyten" here:
https://github.com/letscontrolit/ESPEasy/issues/539
I think data extraction will be difficult.
Is not it better to send data in a correct format?:
viewtopic.php?t=4884
(2)
serialsend
Look at post from "mikeluyten" here:
https://github.com/letscontrolit/ESPEasy/issues/539
- dynamicdave
- Normal user
- Posts: 257
- Joined: 30 Jan 2017, 20:25
- Location: Hampshire, UK
Re: Serial port
Thanks for all your help.
I can now send information/data from the WeMos to my terminal (app running on a mobile phone) using rules.
on !Serial#* do
publish david,%eventvalue%
serialsend %eventvalue%
endon
I can also set a dummy variable using this http command.
http://192.168.1.90/control?cmd=TaskValueSet,12,1,22
What I can't work out is how to send a command-string from my terminal (mobile phone) to the Wemos.
I've tried sending the text string... TaskValueSet,12,1,22 (and all sorts of variations of this) but nothing happens in the dummy variable.
Is there something I should prefix the string with??
Kind regards from David.
PS: Which version of ESP Easy are you using?
I can now send information/data from the WeMos to my terminal (app running on a mobile phone) using rules.
on !Serial#* do
publish david,%eventvalue%
serialsend %eventvalue%
endon
I can also set a dummy variable using this http command.
http://192.168.1.90/control?cmd=TaskValueSet,12,1,22
What I can't work out is how to send a command-string from my terminal (mobile phone) to the Wemos.
I've tried sending the text string... TaskValueSet,12,1,22 (and all sorts of variations of this) but nothing happens in the dummy variable.
Is there something I should prefix the string with??
Kind regards from David.
PS: Which version of ESP Easy are you using?
Re: Serial port
I do it in this way
void tempread() {
float h = dht.readHumidity();
float t = dht.readTemperature();
char temp[] = "TaskValueSet,1,1,";
char hum[] = "TaskValueSet,1,2,";
Serial.print(temp);
Serial.println(t);
Serial.print(hum);
Serial.println(h);
}
void tempread() {
float h = dht.readHumidity();
float t = dht.readTemperature();
char temp[] = "TaskValueSet,1,1,";
char hum[] = "TaskValueSet,1,2,";
Serial.print(temp);
Serial.println(t);
Serial.print(hum);
Serial.println(h);
}
Who is online
Users browsing this forum: No registered users and 92 guests