Questions tagged [strlen]
Returns the length of the C string str. The length of a C string is determined by the terminating null-character: A C string is as long as the number of characters between the beginning of the string and the terminating null character (without including the terminating null character itself). Source: http://www.cplusplus.com/reference/cstring/strlen/
10 questions
3
votes
1
answer
9k
views
How to get char array's length
I use a LCD display to display a not known size of text ( changes over time ). I wish to display it at the center of LCD ( 2X16 ).
I declare:
char t[16];
char h[16];
sprintf(t, "%.1f%cC %.0f%%",...
0
votes
1
answer
94
views
strcat parameters throwing pointer errors in my tcp server / parser application
I am attempting to use an Arduino Uno WiFi Rev2 board to integrate some lonely data. I will use the NINA WiFi chipset and associated libraries to start a server that will periodically request and ...
0
votes
1
answer
148
views
Arduino scrolling text program freeze after some time
I use a 16x2 character lcd to display some text. What I want is first line will stay, but the second line should scroll text.
I wrote a program which works fine but the problem is after some time ...
0
votes
1
answer
2k
views
String & Char concatenations
A newbie in Arduino- and I'm trying to concatenate string and chars ( well in python it is quite different ).
I'm trying to post a MQTT message- constructed following format to the client.publish(...
1
vote
1
answer
1k
views
POST request on Arduino MKR1400 GSM not working
Im trying to send a POST request from the Arduino MKR1400 GSM board to a server with a database.
I've tested the server using Postman (https://www.getpostman.com/) and it handles the POST request ...
0
votes
1
answer
2k
views
Arduino IDE: How to get PROGMEM const length?
I have defined a byte array as a constant in the Atmel's flash memory:
const uint8_t eye [] PROGMEM = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
How can ...
3
votes
1
answer
634
views
Arduino keypad and RF 433MHz transmitter problem
So, the basic idea is that user presses a key on keypad, and key that is pressed is sent with RF transmitter.
I got individual parts to work(keypad and transmitter), but can't send the actual key. ...
5
votes
2
answers
3k
views
Arduino to arduino serial communication without a library
So I'm trying to send an array from one arduino to another through serial communication, without using the software serial library. The arduinos are wired rx->tx, tx->rx and ground to ground. I have a ...
3
votes
2
answers
33k
views
Number of elements in an array char
What kind of function can I use to know how many elements are in an array char?
sizeof() gives the number of 'spaces' available so it doesn't work for me.
3
votes
2
answers
12k
views
Why can't this C++ program read my arduino's Serial.write()?
I made a super simple arduino uno sketch to send a serial byte once every second:
void setup(){
Serial.begin(9600);
}
void loop(){
Serial.write(12); // send a byte with the value 12
delay(...