All Questions
18 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....
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 ...
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
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][]={"...
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 ...
1
vote
0
answers
712
views
Arduino OneWire on multiple pins by index (Array of OneWire Objects)?
I am trying to implement an Arduino project with multiple thermometers (DS18x20) on multiple GPIO pins. I'm using the OneWire library (http://www.pjrc.com/teensy/td_libs_OneWire.html). I want to ...
2
votes
0
answers
187
views
expected ',' or '...' before 'array' in arduino 1.0.5
I am trying to make a robot controlling program in arduino 1.0.5, and I keep getting this error but it makes no sense.
code:
String speeds[7] = {"Stop", "verySlow", "Slow", "ratherSlow", "ratherFast"...
0
votes
2
answers
10k
views
Data in SD card convert it to array arduino?
My data is in a text file in an SD card, and I am trying to make it an array in Arduino. My data is just a bunch of integers that will look like 270 numbers each one on a line.
122
50
255
0
96
I ...
1
vote
2
answers
2k
views
Set an array to different array of unknown size
So I've been programming for my arduino which is some variant of c++. I have been writing a program to tick through every number of a 4 digit seven segment display. I have been having trouble setting ...
1
vote
1
answer
1k
views
How to retrieve a String value from Serial.read();
I am trying to send an SMS that contains multiple values as a String, which then will be received by the Arduino board as a Serial.read(); command. For example, if i where to send the following SMS to ...