How to copy strings into another

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

Now I'm faced with another problem.
I have a string named feedback[]="pvs \n Temp1: *C \n Temp2: *C \n Hum1: %RH \n Hum2: %RH.
If send this string as it is it's successfully received - this is what I need.
The moment I stringcopy strings for the temperature and humidity in their respective indices of the string / the left empty spaces ,
I receive only temperature values. The reset of the string gets truncated. In fact *C for temp2 is also chopped.
I don't understand why this is happening.
Any C language guru

Crazy generation

Last Edited: Sat. Jul 15, 2017 - 10:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using distrof function to convert float into a string. I then directly stringcopy the converted string to the fomulated sting.

Crazy generation

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Locked! You already have a thread on this. http://www.avrfreaks.net/forum/s...

 

And are you using AVR or ARM chip?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Topic locked