UART ATMEGA 8

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
He needs to write a function that checks what is in the token, and sending the content to the UART
how do I do that?
the string looks like this

+ CMT: "123456789" ,, "15/08 / 02.15: 56: 34 + 02"
and on UART wants to send is "123456789" of course, the content can be changed

 

The code needs test function
someone something?

Greetings from Poland

This topic has a solution.

==POLAND==

Last Edited: Tue. Aug 4, 2015 - 09:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Strtok()?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

made subject to close

ps.

 

char* wsk;
   wsk=strtok(buf,"\"");

   if (!strcmp(buf, "+CMT:"));
   
   wsk = strtok(NULL,"\"");
   uart_puts(wsk);

==POLAND==

Last Edited: Tue. Aug 4, 2015 - 09:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are saying this is solved then please click the "mark as solution" button on Kartman's post about strtok() (assuming that was the solution?)

 

Moderator

Last Edited: Tue. Aug 4, 2015 - 09:32 AM