Hello
I'm baffled again.
If I have the below in the circular buffer and wanted just to print the 20.8 temp received how would I do it?
I've tried searching for the string that comes before and it gets located, I just thought I could get the following bytes and that would be what I was looking for but it never seem to print what I'm looking for.
Thanks for any advice
Mark
+IPD,100:<span id="ctl00_ContentMain_dlParams_ctl01_lblPValue"><b><font size="6">20.8°C</font></b></span>CLOSED
Circular buffer question help needed.
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Circular buffer question help needed.
Hi Mark,
Please can you post the program or a snippet of code that shows what you are doing and hopefully we can point you in the right direction.
Please can you post the program or a snippet of code that shows what you are doing and hopefully we can point you in the right direction.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 61
- Joined: Sat Apr 11, 2015 12:07 pm
- Has thanked: 20 times
- Been thanked: 14 times
- Contact:
Re: Circular buffer question help needed.
I had some luck I'm getting >22.8 on the display. Could do without the ">" appearing though.
I'm just wondering how to isolate the 22.8 out of the data received.
I'm very thick. I've attached my attempt
+IPD,100:<span id="ctl00_ContentMain_dlParams_ctl01_lblPValue"><b><font size="6">22.8°C</font></b></span>CLOSED
I'm not sure about all the chip config options available to the micro I'm using.
I have an external xtal. Somethings happening so it must be half right.
I'm just wondering how to isolate the 22.8 out of the data received.
I'm very thick. I've attached my attempt
+IPD,100:<span id="ctl00_ContentMain_dlParams_ctl01_lblPValue"><b><font size="6">22.8°C</font></b></span>CLOSED
I'm not sure about all the chip config options available to the micro I'm using.
I have an external xtal. Somethings happening so it must be half right.
- Attachments
-
- 8266-1.fcfx
- (19.91 KiB) Downloaded 275 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Circular buffer question help needed.
Hello,
How's this. I have created a simple state machine that looks for the "6">" and then starts filling the buffer until we reach the next "<" character.
You may want to finish the reading after you receive the '&' character instead of the '<' but it should be easy for you to change this by switching the last compare hex value.
How's this. I have created a simple state machine that looks for the "6">" and then starts filling the buffer until we reach the next "<" character.
You may want to finish the reading after you receive the '&' character instead of the '<' but it should be easy for you to change this by switching the last compare hex value.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 61
- Joined: Sat Apr 11, 2015 12:07 pm
- Has thanked: 20 times
- Been thanked: 14 times
- Contact:
Re: Circular buffer question help needed.
Thanks very much.
You've got a very logical brain.
I only had to alter 2 small things and it worked perfectly.
Why could I not see that solution.
Thanks again.
You've got a very logical brain.
I only had to alter 2 small things and it worked perfectly.
Why could I not see that solution.
Thanks again.