[OpenTRV-dev] OT: Help with a bit of arduino
Damon Hart-Davis
dhd at exnet.com
Tue Sep 1 09:19:53 BST 2015
Hi Bo,
Thank looks like a non-trivial parsing job.
If you look at the CLI code in OpenTRV you can see it reading line by line from Serial, and then for some of the commands using strtok_r() to chop the line into parts.
But you’ll have to be really clear what you are trying to do if you don’t want massive code bloat.
Rgds
Damon
> On 28 Aug 2015, at 17:31, Bo Herrmannsen <bo.herrmannsen at gmail.com> wrote:
>
> Hi all
>
> hope i once more can get a bit of help
>
>
> i'm cooking up a GSM remote control for my car's preheater
>
>
> wanting to set the time just to verify i got basic coms right and not let the money train run wild
>
>
> AT+CLTS=1
> and
> AT+CCLK?
> that returns something like ..
> +CCLK: "15/02/21,22:32:25+12"
> OK
>
> how would i turn that in to variables?
>
> i know i need to read it off a serial port and then split it up... but google is just not with me here
>
> rgds bo
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
More information about the OpenTRV-dev
mailing list