I have some variables that I'm printing to an LCD, and also want to tweet.
I'm getting a simple float from a BMP085 using the adafruit library. lcd.print() takes the float just fine.
I also want to construct a string to send out a tweet of the data. I'm using http://arduino-tweet.appspot.com/ and it works great for a simple hard-coded const char.
pres = pres / 1000; //convert to mb from the default lcd.print(pres, 1); //works great lcd.print(" mb"); //works great char pres_c = char(pres); char twt = "This is my test tweet. The air pressure is" + pres_c + " mb" tweetMsg(twt);
I'm getting the following errors:
firmware.ino: In function ‘void getPress(float)’: firmware:222: error: invalid operands of types ‘const char*’ and ‘const char ’ to binary ‘operator+’ firmware:224: error: invalid conversion from ‘char’ to ‘char*’ firmware:224: error: initializing argument 1 of ‘void tweetMsg(char*)’
Can someone set me on the right track? I've tried every combination/permutation that I can think of to cast these all the same.