All Questions
Tagged with arduino-ide arrays
24 questions
0
votes
2
answers
141
views
Problem with BME280 and long char arrays on Arduino
I am trying to fill a char array with 1800 characters (1 and 0) from digital pin 7 (data from a rain gauge) before reading the air pressure from a BME280 using Arduino UNO. The results are printed ...
0
votes
1
answer
1k
views
Arduino: Convert string array to byte array
I am working on a project where I first need to build up the payload as a string then later on convert it to byte when sending the payload. I am having issues with conversion.
Reson why payload build-...
0
votes
1
answer
101
views
Array Data Reading Failed
I am reading the data from a "Torque Wrench" using "USB Host Shield2.0" and Arduino UNO. I am receiving correct data from my "Torque Wrench" Data is receiving in a array.
...
0
votes
2
answers
249
views
Multi-dimensional Array Initialization in C
I'm piddling around with an Arduino and I have next to no programming in C.
In looking through some example code I came across this array variable declaration:
byte myArray[][6] = {"0"};
I ...
1
vote
2
answers
899
views
Error argument of type "int *" is incompatible with parameter of type "uint8_t
This is my first time coding. I just learned some stuff from youtube.com and this is the first time I am using that knowledge to write a an arduino sketch for my micro-controller. Please go easy on me....
-1
votes
1
answer
147
views
Arduino IDE: array bound
I get an array bound error in Arduino IDE for the following code. This can be solved if I put the outcome of the calculation for the "sample" (which is 50 in this case) but this is kind of dummy ...
0
votes
2
answers
226
views
My code wont print out the correct value for the array index 0
#include <NewPing.h>
#define SONAR_NUM 6 // Number of sensors.
#define MAX_DISTANCE 500 // Maximum distance (in cm) to ping.
NewPing sonar[SONAR_NUM] = // Sensor object array. Each ...
1
vote
1
answer
4k
views
How do you convert a char array into string in arduino code
I have a project to collect a html web page and convert it to a set of strings to be printed.
I use arduino IDE to code this application, so java and other solutions do not work as it has to be ...
0
votes
0
answers
2k
views
Getting a value from a Struct Array ARDUINO
I am having an issue retrieving the values stored in a Struct and have no idea why.
I am working on the Arduino IDE 1.8.7
In h file
// structure to hold each "display unit" settings
typedef struct ...
0
votes
1
answer
79
views
C++ Workaround for multidimensional arrays of dynamic size
I'm looking for an easy workaround for two-dimensional arrays of dynamic size as parameters that literally students from the 5th grade can easily use. I'm currently writing a library for a micro ...
0
votes
1
answer
558
views
2d array in Arduino with different row size
I'm going to use an Arduino to play a melody, the melody is split into 11 parts which stored in an array called notes
Here's the code:
String notes[0][]={"do", "re", "mi", "fa"};
String notes[1][]={"...
0
votes
2
answers
83
views
Printing top three repeated elements in LCD display
I have an array whose input is given by the user by using keypad. All the inputs are stored in an array named storeKeys. The index of the array is held by a variable storeKeysIndex is initialized to 0 ...
2
votes
2
answers
4k
views
Return array or multiple variables from a function
int arrays[2] = {0,1};
void setup () {
Serial.begin(9600);
pinMode(2,INPUT);
}
void loop () {
int buttonstate = digitalRead(2); //reads I/O pin 2
if (buttonstate==HIGH) { /...
0
votes
1
answer
137
views
Temp variable not assigning right value from array
I am writing a program on the arduino IDE where i want to swap some variables around. If you are unaware of arduino, it is essentially written in C++.
A bit of background information:
Pieces is a 2D ...
0
votes
1
answer
53
views
Using an array in the Arduino ide
Hi i'm trying to use an array to make a code for the arduino to play music using a piezo speaker, however it's having trouble receiving data from the array. Please help, thanks!
int y = 0;
int x = ...