Tagged Questions
0
votes
1answer
49 views
Arduino Serial.write() Missing Data
I'm reading data from Serial2 and writing data to Serial3 on Arduino like this:
Serial3.write(Serial2.read());
I am writing a concatenated string from Python that looks like this:
myNum = ...
0
votes
1answer
42 views
Send String Over Bluetooth to Android Device on Arduino
I'm sending strings over Bluetooth to an Android device.
I have an Arduino board with a Synapse SNAP RF100 module and a RN42 Bluetooth module connected to serial ports.
The data is read from the ...
0
votes
1answer
33 views
Android and arduino, send a string how it works
Sorry for my bad english, try to understand me.
So i use a bluetooth serial connection to send data from arduino to android, and i use this code in my arduino :
char toSend = (char)Serial.read();
...
2
votes
2answers
30 views
“unknown type name 'String'” when creating custom Arduino Libraries
I have a few logging functions that I commonly use for different Arduino programs. Since I use them so much, I decided to try to make a custom library for them. Unfortunately, the compiler crashes ...
0
votes
1answer
43 views
How to empty a string in Arduino c language
I wrote the below in arduino code language (c or c++ ?)
And i got puzled, i'm not sure if this is a limitation from C or C++.
My function should split a text string and return word number x
In my ...
0
votes
1answer
67 views
Sending string from pc to arduino
I have a string, specifically, a cellphone number with 11 digits inputted from a serial port(pc) and am planning to send it to arduino. I've got no problems in inputting the string and print it to ...
0
votes
2answers
52 views
Why are only the last letters from these strings being printed?
I was curious to see if the Arduino Leonardo's keyboard and mouse libraries could possibly be used as a windows user password brute force hacker. Using my limited hobby coding and arduino skills i ...
0
votes
1answer
178 views
Maintaining communication between Arduino and Java program
I have gotten a project in school that consists of a RC car that gets controlled over WiFi. It works just fine for a few seconds, but then it just stops the connection and tries to reconnect again. ...
0
votes
1answer
436 views
Arduino making a serial read string split and Then convert to Int
I've been trying split a string in arduino using many different ways, but nothing seems to work. My latest attempt:
String inData = "";
int cPosition;
String data[2];
int count = 1;
...
0
votes
2answers
860 views
Arduino: uint8_t array to string
I have an NFC application built on android that sends a hash as an apdu answer. This is the code I use in my Android app to send the hash:
@Override
public byte[] processCommandApdu(byte[] arg0, ...
1
vote
3answers
69 views
Concatenating chars from a char array into one integer
I've been trying to create serial motor controller from an ATtiny 85. I have it setup as a slave. It receives chars from a master one byte at a time and loads them into a char array for parsing.
...
0
votes
2answers
2k views
convert double type into string type in arduino sketch
double ambientTemp=44.00;
String yourdatacolumn="yourdata=";
String yourdata;
double yourarduinodata=ambientTemp;
yourdata = yourdatacolumn + yourarduinodata;
//I want the output to be string. ...
1
vote
2answers
613 views
Sending strings over Serial to Arduino
I'm currently experimenting with sending a string to my Arduino Yun and trying to get it to reply back depending on what I send it.
I picked up a framework of some code here and have been ...
0
votes
4answers
535 views
Parsing series of strings from a received SMS in GSM modem using Arduino
I'm trying to reply from a received SMS in a gsm modem.
The problem is, I don't know how to extract the phone number from this series of strings so I could get the number of the sender.
I must ...
0
votes
2answers
281 views
Iterate through 2 dimensional array in C
I have a 2 dimensional array that contains string values. I am using an enum to keep track of the first index of the array when iterating. I am trying to find the enum (first dimension of an array) ...
1
vote
1answer
559 views
Arduino (C/C++) Code To Display Contents of Array on LCD
I've tried to do as much researching as I could before posting this, but I am new to programming, so my general ignorance is at this point preventing me from really being able to know how to ask the ...
0
votes
1answer
908 views
Python string formatting to send through serial port
I need to properly format the string in order to send it to the arduino connected through a serial port. For example I have this python2.7.5 code:
x = int(7)
y = int(7000.523)
self.ser.write("%s%s" % ...
1
vote
3answers
1k views
Are there limits on string length in Arduino?
I've been trying for hours to put together a simple JSON object string on an arduino to send to a Raspberry Pi running node.
I cannot seem to successfully build the string. I have tried building the ...
0
votes
2answers
1k views
Creating an Array of Strings from miscro SD Arduino
I'm involved in a project where i need to READ data from a "csv" file and then i need to storage this information in an Array of Strings in order to search, write, delete and add information after the ...
0
votes
0answers
163 views
Arduino char *name from string
Ok, so I'm making a little song player, and it plays using RTTTL "char*"s
char *song = ...
0
votes
1answer
123 views
How do I convert my GPS NEMA sentences to a string using an Arduino?
I am attempting to parse information from a GPS module using an Arduino Uno. My thought was to convert the NEMA sentences to strings, then use a simple code to split the comma separated text into ...
1
vote
2answers
70 views
How can PSTR receive multiple strings not separated by commas?
I'm studying the code from the rbb_server example of ENC28J60's library for Arduino (I would put the link here if I could) and I've noticed this wierd piece of code:
static word homePage() {
long ...
1
vote
2answers
10k views
Transform char array into String
I have a function that returns a char array and I want that turned into a String so I can better process it (compare to other stored data). I am using this simple for that should work, but it doesn't ...
1
vote
1answer
2k views
How to use lcd.write with String Array in Arduino
My code fragment is
String item[] = {"Hello","How","Where"};
int slot[] = {2,0,0};
i=0;
String t = item[slot[i]];
lcd.write(t); //This gives error
How to eradicate the problem. I am a ...
1
vote
0answers
128 views
Serial string problems
I am very new to programming the arduino, but I have been given a pretty complex task to undertake with it. My classmate is writing a program in visual basic for Windows. My program is to work in ...
2
votes
1answer
447 views
Working with arrays on Arduino in C++
I'm trying to manipulate arrays, but I'm a little confused with I need to do. I want to do something like:
char myArray[10];
myArray[0] = 0xA9;
myArray[1] = 'D';
myArray[2] = 'S';
myArray[3] = ...
0
votes
2answers
138 views
Converting String style from Arduino to C common style
I have the following code
void loop() {
String outMessage = ""; // String to hold input
while (Serial.available() > 0) { // check if at least one char is available
char inChar = ...
1
vote
1answer
84 views
How to view each element from a string or data using Objective-C?
I'm creating an iOS application that receives an input from a force sensor. The Arduino is connected to a BLE Bluetooth transmitter, that sends a data stream of information to the application.
Below ...
0
votes
1answer
679 views
How to convert stringified binary (a string of “1”s and “0”) to a corresponding char string
Given a stringified binary representation, I would like to convert it back to real binary which will be treated as chars. For example, the string 01000001 01000010 01000011 01000001 should be ...
0
votes
2answers
330 views
How can I digitalRead a pin and convert data to String on Arduino?
I'm doing a communication system with 2 Arduinos Leonardo. To transmit I had to convert a String in bits and send them trough a PWM pin. The question is, how can I do the receiver?
My idea is to ...
1
vote
3answers
364 views
digitalRead to String on arduino
I'm doing a communication system with 2 Arduinos Leonardo.
To transmit I had to convert a String in bits and send them trough a PWM pin.
The question is, how can I do the receiver?
My idea is to ...
1
vote
1answer
464 views
Split array char got from Serial in Arduino IDE
Using Arduino IDE, I am trying to read a string from Serial and after I need to process it, separating some bytes from it. The string begins with @ and terminates with ;. The "parts" of the data are:
...
-1
votes
3answers
361 views
Compare Serial read data and analog read value
I am going to send a input to Arduino through serial communication. That variable should be stored in a variable. That data which I send through serial communication should be compared to an analog ...
0
votes
1answer
1k views
How to convert the incoming characters coming from gsm module into a string?
Its my first time to use gsm shield to my arduino so I'm kinda confused so i need directions. My aim is to read the message sent to my gsm shield then compare that message into a specific string. if ...
1
vote
1answer
216 views
String.substring not returning true
I'm working on an Arduino and String.substring does not appear to be operating correctly, so I'm wondering what I may be doing wrong....
My function is as follows:
boolean processSerial()
{
...
0
votes
2answers
66 views
Can't save something written in the Serial Monitor for Arudino as a String/char
When I type the word in for the first line, the first letter is saved for the second line and nothing is saved for the first line. How do I fix this problem?
Here's the code: ...
0
votes
2answers
6k views
Splitting a comma-delimited string of integers
My background is not in C (it's in Real Studio - similar to VB) and I'm really struggling to split a comma-delimited string since I'm not used to low-level string handling.
I'm sending strings to an ...
-1
votes
2answers
672 views
Arduino array memory usage
If I declare an array in the global scope, it uses up memory to store it. However, if I declare an array (I am using two types, one is a char array, while the other is an int array) inside a function ...
0
votes
2answers
2k views
Arduino issue: String to float adds two zeros instead of the correct integer
Code snippet:
Serial.println(sensorString); //so you can see the captured string
char carray[sensorString.length() + 1]; //determine size of the array
Serial.println(sizeof(carray));
...
3
votes
3answers
12k views
How read string from Serial?
I have to manage servos from a computer.
So I have to send manage messages from computer to Arduino. I need manage the number of servo and the corner. I'm thinking of sendin something like this : ...
1
vote
3answers
8k views
Arduino (C language) parsing string with delimiter (input through serial interface)
Arduino (C language) parsing string with delimiter (input through serial interface)
Didn't find the answer here :/
I want to send to my arduino through a serial interface (Serial.read()) a simple ...
1
vote
2answers
6k views
C - Format char array like printf
I want to format a c-string like printf does this. An example:
char string[] = "Your Number:%i";
int number = 33;
--> String should now be "Your Number:33"
Is there any library or a good way I ...
3
votes
2answers
12k views
Arduino: String to int gets strange values
I want to convert a String to an int, and all I could find is that you have to convert the String to a char array and then cast this array to an int, but my code produces strange values and I can't ...
2
votes
1answer
1k views
Strings in C++ class file for Arduino not compiling
I'm writing a stack class in C++ for an Arduino sketch. I believe it is fully compliant with the AVR (if that's what it's called; I can't remember exactly) compiler; I've used all malloc and free ...
2
votes
1answer
3k views
C++ string and Arduino String. How to combine them?
I have been writing a library for my project (for now I am using Arduino). The problem that I have is that string in C++ and in Arduino differ.
That is, I would like my library to be independent of ...
0
votes
1answer
213 views
Sound string declaration hangs Arduino compiler
I have a string of characters from an 8 but the WAV file that I'm trying to import into my Arduino project. I declare it like this
const unsigned char sounddata_data[] PROGMEM = "€€[fill these ...
4
votes
1answer
3k views
Arduino: Crashes and errors when concatenating Strings
I try to concatenate the output of AES-256 encryption to a string (to compare this string against the encrypted String sent from an Android phone).
Basically, the concatination seems to work, but ...
5
votes
4answers
17k views
Split String into String array
I have been playing around with programming for arduino but today i've come across a problem that i can't solve with my very limited C knowledge.
Here's how it goes.
I'm creating a pc application that ...
1
vote
6answers
6k views
String to const char* in Arduino?
I have a variable tweet that is a string and it has a character at the very beginning that I want to clip off.
So what I want to do is use strstr() to remove it. Here's my code:
tweet = ...
3
votes
6answers
7k views
Convert int to string/char C++/Arduino
This has got to be the easiest thing to do in C++.
..and I know it's been asked many many times before, however please keep in mind that this is part of an Arduino project and memory saving is a ...