A sequence of characters -- including letters, numbers and symbols -- often used for representing information in a human-readable format.
0
votes
1answer
39 views
Reading a 10-byte buffer out of a PROGMEM string stored in a string table
I'm storing a large snippet of text in three separate PROGMEM char arrays:
const char script1[] PROGMEM = "....";
const char script2[] PROGMEM = "....";
const char script3[] PROGMEM = "....";
The ...
-1
votes
0answers
15 views
how to configure arduino to use utf8 serial transmition
am working with and Arduino and a SIM900 modem,
so far am able to send sms with no problem, but I would like to use utf8 format for the content of my message....
how can I configure my modem to do ...
0
votes
1answer
28 views
Why is my Serial port not printing the right output?
am working with and Arduino nano and according to this, I can append strings to numbers by doing: stringThree = stringOne + 123; but
when I do:
sensorValue = analogRead(A0);
String x1 = "{\"Volt\":"+...
0
votes
1answer
59 views
Using StringStream in Arduino sketch
I learned about StringStream today at work.
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string.h>
using namespace std;
char* getSql() {
float ...
0
votes
1answer
12 views
Using strings inside mBlock extensions code
The following question is about a 3rd party Arduino programming enviroment mBlock and creating extensions for it. I hope that there are some of you out there, who are fammiliar with it.
I was ...
-1
votes
1answer
53 views
Why is integer-to-string not working in this sketch?
I am using a Pro Mini to read analog values and to send them via serial.
Goal of the sketch is to stream these values to Serial as fast as possible, to obtain a steady stream of at least 1000 ...
0
votes
2answers
36 views
Push to 2D array (log) but last value pushed is everywhere
I have this simple that is supposed to keep a log for me with a fixed number of entries. When I add to the log the oldest replaced is by the second oldest etc and the new entry added. Except when I ...
0
votes
1answer
35 views
String use in arduino IDE (this question for understanding) [duplicate]
I'm using arduino several month now, And i don't understand when i can use the arduino object of String. I'll explain, I read a lot and the it's look like that this object is a good way to read/write ...
0
votes
1answer
56 views
Storing latitude and longitude floats as chars with specified precision
I am receiving lat and long data from a GPS and want to store these numbers in the middle of a sequence of chars.
E.g. lat = -23.123456
long = 135.123456
I am after something like "Your coordinates ...
0
votes
1answer
35 views
How to store a string in an object and retrieve it safely later?
I'm writing a program where I will be able to toggle between multiple banks, and each bank has 4 presets on it. Right now, I'm trying to give each preset a name that is assigned on creation.
I have ...
0
votes
3answers
55 views
How do I send a string from an Arduino Slave using SPI?
I have an Arduino Uno acting as a master with 3 Arduino Nano's acting as a slaves.
Looking at this example:
http://www.gammon.com.au/forum/?id=10892, it tells me how to send a string from the master ...
1
vote
1answer
43 views
RFM69HCW 915 MHz radio module: Sending a stream of int values rather than char[ ]
I'm trying to send a stream of int values (0-4096) from one arduino to another using an RFM69HCW module.
Here's my main code:
#include <RFM69.h>
#include <SPI.h>
#define NETWORKID 0 ...
0
votes
0answers
37 views
How to split a string in substring? [duplicate]
I have a python background and know how to do string manipulations there. Coming to arduino (C++) I kind of doesn't feel comfortable doing simple stuff that I know in python because it's more low ...
0
votes
3answers
17 views
Merging strings and constants causing scope errors
I'm getting a few errors when merging strings with constants.
Here's the pertinent code...
#define STATION_ID ABC123
#define STATION_PASS XYZ987
void loop(){
String path = "/weatherstation/...
1
vote
2answers
85 views
eval() function for Arduino?
I plan to do the following:
void setup(){
String term = "12 + (2 * 5)";
int result = eval(term); // eval function (from Python)
Serial.println(result); // expecting 22
}
However there is no ...
0
votes
1answer
32 views
two dimensional array with 3 characters per entry?
my plan is to create a two dimensional array with 3 characters in each cell.
what i have tried:
char keys[3][8][8] = {
{' ','4','5','6','x','/',' ',' '},
{'x10','7','8','9',' ',' ',' ',' '},
{'...
0
votes
1answer
55 views
Difficulties with raw string literals
I have an application where I would like to include an external multiline script as a const in my sketch. As far as I understand from C++11, this should work:
raw_string_literal_test.ino
const char *...
1
vote
1answer
57 views
strtok problem while parsing String
Here is my code. The incoming string is "*CRB12344,Temp25,Humidity55,CC5#"
I am unable to get value of Temp which is 25 and Humidity which is 55 and CC which 5. It only display the value of CR i.e ...
1
vote
1answer
44 views
Arduino SSCANF stop on comma delimiter
I have the following problem, the arduino is receiving a command like
LCD,Display line text one, Display line text two
I use an strcmp to match the beginning of the string that works but now I would ...
2
votes
1answer
32 views
Blank.txt at the End of Transmission
I'm using my HC-05 (Master) to receive strings from a sensor (Slave), each string is suppose to have 7 items divided by ',' like so "a,b,c,d,e,f,g". I also have to write these strings in a .txt file ...
1
vote
0answers
83 views
save bytes from Serial into ROM (EEPROM)
i am trying to save an incomming text from serial into the rom of the arduino using EEPROM. I found out that you can only save a byte at once. So i thought i could do it like that:
#include <...
1
vote
2answers
32 views
Why do i get additional characters when reading a file through a buffer if buffer size > 15?
This is a follow up question to How to speed up writing a file to a WifiClient?
I modified the old code to read from one Stream and write to another which looked like this and worked fine albite ...
-1
votes
1answer
25 views
Replacing stock String.cpp with smaller version
Hey all I am wondering if it's possible to modify the WString.cpp file to only include the commands that I need for my project since that file is so large.
I am using a Digispark arduino that is ...
3
votes
3answers
89 views
How to multiply strings?
I want to have a line like this
Serial.println(count*"B");
So if count=6, it would print BBBBBB, etc.
Is there anything like this for arduino?
-1
votes
1answer
46 views
Including string class in Eclipse Neon
Probably basic question but when I type include in class of my arduino project I get only error. How do I properly include this string class?
1
vote
1answer
67 views
Serial Communication Not Receiving Entire String
I have an Arduino connected to a pico motor driver that is supposed to take a number of steps for a specific number of triggers that gets from a source (i.e. waveform generator). I've setup the code ...
0
votes
1answer
78 views
Converting uint8_t to String - unexpected result
I'm working on a remote control code for ESP controller. Using ESPwebserver and Fastled. When I try to return a value of an uint8_t, as a POST response, i got strange result here is the relevant code:
...
0
votes
1answer
35 views
check string for specific characters?
I am just wondering if it is possible to check a string for specific characters. For example if my string is String mystr = "test"; and I wanted to check for the letter t at the beginning and if it ...
0
votes
2answers
33 views
Nano resets or freezes on calling a function
I'm controlling a light bulb with my Arduino Nano from serial or RF (via nRF24L01+) and I'm passing the commands as a string. After I get all the variables (3 ints) I try calling the function ...
2
votes
2answers
56 views
Help with a Memory Issue
Below is some code that I'm writing to concurrently run "animations" on the same strip of NeoPixels. When I try to make use of the Serial monitor to control the program functions, I just get a bunch ...
3
votes
2answers
81 views
Understanding memory fragmentation due to char arrays in functions
This is similar to:
Is this function subject to memory fragmentation?
I am trying to get my head around Memory fragmentation in Arduino's and embedded systems in general.
Currently I have a ...
0
votes
2answers
91 views
The most effective way to format numbers on Arduino
I made a big search about how to Format Numbers with the Arduino. I want to format unsigned Longs into a String in this format: "23,854,972".
The most of the snippets I found work only with the ...
1
vote
1answer
338 views
Parse HTTP Request Arduino
I am sending a HTTP Request to my WiFi module http://192.168.4.1/STA/ID=HelloWorld/Pass=Testin123
How can I parse above string in Arduino. First I need to check for STA, if it exists, continue to ...
1
vote
1answer
64 views
Declaring literal strings
When I want to write a literal string in Python, I use r before the string (or @ in C#):
in [1]: print r'\no esca\pe ch\ara\cters'
out [1]: \no esca\pe ch\ara\cters
In straight c++ I can use R, but ...
0
votes
1answer
57 views
WebSocket client for ArduinoHttpClient conditional if with readString() incoming data buffer
I'm having issues implementing a web socket on the Arduino/Genuino to procress a string received and do something respectively.
I'm using SimpleWebSocket example, edited for my purpose, from the ...
1
vote
5answers
526 views
Is possible to concatenate integers?
It's a basic one: I have two values from two different analogRead pins:
int val1;
int val2;
For example, val1 = 10 and val2 = 10. How could I put these two values into a variable val3 = val1 + val2 ...
0
votes
1answer
341 views
Size of String array
I am trying to find out the size of an array like this:
String days[3] = { "Mon", "Tue", "Wed" };
Serial.printf("Size of array: %2d\n", sizeof(days));
for (int i = 0; i < sizeof(days); i++) {
...
3
votes
1answer
51 views
Informations lost in a string
At first, I sorry if I make some English faults but I'm French.
So, I'm making a connection between a client and an Arduino Uno. I receive all data that I need but when I send a response to my ...
0
votes
0answers
348 views
Parsing GET function + ESP8266 + ARDUINO IDE
I am working on a ESP and making it a simple Http web server. I have successfully ON/OFF the led using the browser. I need to use PWM, instead of Switching the led. As of now When I hit http://192.168....
0
votes
0answers
196 views
Arduino UNO stops working after a while - SOLVED
So I was looking after this problem of course, but I cannot guess what the problem can be.
I am using Arduino UNO with a matrix module and it after I upload the program it works correctly always for ...
1
vote
1answer
1k views
How to convert String to Double?
I found the .toFloat() but that's not accurate enough.
String StrEx = "57.10598";
float FloatEx = StrEx.toFloat();
Serial.println(String(FloatEx)); //outputs 57.11
Serial.println(StrEx); //...
0
votes
1answer
321 views
how to send large strings (> 100 characters) from arduino serial monitor
I am a newbie to arduino programming. I wish to send big strings which are in range of 100 to 1000 characters to my arduino uno. I saw that arduino cannot read more than 63 characters at a time.
The ...
0
votes
1answer
387 views
Remove certain characters from char*
I've got an array of char* with serial data that I'm trying to remove ':' from. I have tried to iterate through the char*, find and remove any colons but it just comes out as garbage.
char* espData[...
0
votes
1answer
160 views
Arduino: put string through variable in array
I have a problem and I can't fix it.
I'm busy with an java to arduino project.
Java writes a string using writeString();
Arduino reads the serial monitor and put the incoming string into a function.
...
0
votes
0answers
496 views
Using Sprintf() to left pad a string?
I've been at this all day, and I just can't seem to wrap my mind around how to use sprintf() to set a width for my string so that my characters are right justified.
What I'm trying to do is scooch ...
0
votes
1answer
784 views
convert String to unsigned long long
i want to convert string for example
"68976543210" to unsigned long long(64 bit) in mega2560,
do is possible?
String x="68976543210";
unsigned long long y=?;
0
votes
1answer
38 views
error loading an array of strings
I'm trying to have a user enter a series of strings. This is my code.
this is my error message - cannot convert 'String' to 'char*' in assignment
char* titles[] = {"entry one", "entry two", "entry ...
-1
votes
1answer
108 views
Strings that always stay empty
I wrote an app that listens on the network for command over UDP and sends back an answer. Whatever I try to put into my answer never get sent. The string is always empty. The following code prints a ...
0
votes
3answers
61 views
I need to build a char array from two integers
My C is rusty, so please forgive this simple problem.
This line works:
Tft.drawString("Test",200,200,2,WHITE);
But, this has compile errors:
String yStr = "Test";
Tft.drawString(yStr,200,200,2,...
1
vote
1answer
229 views
Split string into an array of string
I have a SIM900 module connected to an Arduino Uno, using an AT command for listing the SMS I get this output, how can i split this based on (,) to store each data in an array?
AT+CMGL="ALL"
+CMGL: ...