A sequence of characters -- including letters, numbers and symbols -- often used for representing information in a human-readable format.
1
vote
1answer
28 views
How do I send a string to master using i2c
I want to write an Arduino program that simply recieves a string (via the I2C wire library) from a master Arduino, then waits for a request, and sends that string back.
Here is my code:
#include ...
0
votes
1answer
37 views
How to return a message when calling by a TCP connection?
I am working on a communication between android and arduino board.
The android make a TCP connection with the board and successfully send some string to the board.
The problem is , there is a int ...
0
votes
1answer
32 views
OSC parsing code. Can it be optimised?
I'm using this OSC library and TouchOSC to controls some motors.
Right now I'm receiving those two kind of messages:
/u/1 // move motor 1 of default steps
/u/2 // move motor 2 of default ...
0
votes
2answers
51 views
Simple word translator, return error: invalid array assignment
I know this is not a good question. But I am clueless with this error : invalid array assignment (at function convert). For extra information, I involved a lot of copying/pasting programs I haven't ...
0
votes
1answer
51 views
Is there any way that the values here be converted to another variable and not string?
int val1 =(mfrc522.uid.uidByte[0]);
int val2 =(mfrc522.uid.uidByte[1]);
int val3 =(mfrc522.uid.uidByte[2]);
int val4 =(mfrc522.uid.uidByte[3]);
String valA=String(val1);
String valB=String(val2);
...
0
votes
1answer
68 views
Simple Text input using 5 buttons
So I have to get this function done but I'm not so bright and got confused.
(excuse me! I'm total noob)
The function is basically inputing text using five buttons, directional buttons and an ok ...
0
votes
2answers
111 views
How to split in string
I want to split this:
char* value = "12;32;blue";
or
string value = "12;32;blue";
into this vars:
TV = 12;
AR = 32;
LED = "blue";
is it possible?
0
votes
0answers
91 views
Checking string condition?
I'm looking for my Arduino board to jump to a function based on an if condition, where a string (content) is checked to see if it matches the word FALLEN. However, the if condition never occurs ...
0
votes
2answers
35 views
sprintf trouble
char cTime[22];
sprintf(cTime, "%04s/%02s/%2s:%02s:%02s:%02s", year(), month(), day(), hour(), minute(), second());
This sprintf line causes this error:**B0100000063f694Š
Could someone help me ...
0
votes
1answer
94 views
DateTime to string
For some reason I can't use the Time.h lib.
Can you guys tell me how to create a string from the datetime into a format like this:
"yyyy.MM.dd:hh.mm.ss"
2014.10.29:07.12.33
Seems odd that I can't ...
1
vote
1answer
76 views
Problems with substring loop
Hey folks … I was hoping some of you might cast your eye over my code.
It splits up a string read from EEprom into an array of separate strings. Based on String length information stored in a ...
0
votes
1answer
223 views
Print string from arduino to serial monitor
I want to send text over serial monitor to Arduino and make Arduino return that string back to me over serial monitor.
I have made this function which reads from serial input and returns a string ...
1
vote
1answer
134 views
GSM library , sendSMS, string instead of char
I used the GSM library that comes together with arduino 1.
Specifically the sendSMS part.
I managed sucesfully to send SMS.
Now the thing is, inside this library the SMS to send is stored in a char ...
1
vote
2answers
111 views
appending string to char and vice versa
Some days ago i started a thread.
concatenation of non constant character array with a sting
I have a different question but on the same nature (string and chars)
what i want is one variable (string ...
1
vote
2answers
472 views
concatenation of non constant character array with a sting
I have an arduino duemilanove.
I read this page on string concatenation. http://arduino.cc/en/Tutorial/StringAdditionOperator
Yet, it didnt include my case.
I have a non constant character array, ...
1
vote
1answer
411 views
How to use String.substring?
I have the following code in which requestLine is always empty and I can't figure out why. request contains a raw HTTP request, and I want to get the first line of the request which contains the ...
4
votes
2answers
83 views
Convert a Bitstring into an integer value
I have got a String filled up with 0 and 1 and would like to get an Integer out of it:
String bitString = "";
int Number;
int tmp;
bitString = "";
for (i=1;i<=10;i++)
{
tmp= analogRead ...
3
votes
1answer
510 views
Check contents of buffer after serial read
I would like to test the contents of data received over a serial connection. In my loop() I store the data in bffr; and afterwards I would like to test to see if there are some predefined words in it.
...
8
votes
6answers
19k views
How do I split an incoming string?
I am sending a list of servo positions via the serial connection to the arduino in the following format
1:90&2:80&3:180
Which would be parsed as:
servoId : Position & servoId : ...
0
votes
1answer
668 views
Nothng Written to Serial when using sprintf
I'm using sprintf to use a format specifier myTemplate with some strings. The result will then be written to Serial. Although the sketch compiles fine, it does not write any thing to the serial, ...
6
votes
1answer
488 views
Is it better to use c_str or toCharArray?
When reading/trying a recent answer, I was surprised to see that Arduino's String class supports the c_str() method, just like the C++ std::string class. As expected, it appears to get a pointer to ...
15
votes
5answers
18k views
How do I print multiple variables in a string?
Say I have some variables that I want to print out to the terminal, what's the easiest way to print them in a string?
Currently I do something like this:
Serial.print("Var 1:");Serial.println(var1);
...