All Questions
Tagged with array arduino-uno
50 questions
1
vote
2
answers
115
views
Program to Multiply Numbers Won't Actually Multiply Them
I am trying to write a program which takes in a number of pairs to be multiplied, then prints out the result of each multiplication. Instead of doing this, the program just prints out the number of ...
0
votes
1
answer
114
views
Problem with character concatenation algorithm in matrix led
good afternoon, I am making a 7x10 led matrix in which I use a CD4017 to handle the 7 rows and 2 cascaded shift registers to handle the 10 columns.
I first tried a programming to turn on my entire led ...
0
votes
2
answers
1k
views
Why I cant get sizeof a pointer Array
well I am trying to get array size to convert hex value to int value. but if I try to get size of array it returns every time 2. Actually .I dont understand. how to get array size, can you help me?
...
1
vote
1
answer
2k
views
How to convert a String to Hex array
I am trying use a HMI display. If I want to send a data, for example I want to write "TOPWAY" to 0x00000080 address it should like that:
Serial.write(0xaa); // packet head
Serial....
1
vote
1
answer
520
views
Trouble initializing a struct array
The goal for this is to create a struct that includes a name, ID, fileName, and a boolean, then create an array of that structs.
Here's what I came up with:
struct Amiibo
{
char *aName{};
char *ID{...
2
votes
0
answers
119
views
Parsing read SD file into 2 variables
Recently I started some tests controlling water heater with temperature sensor data as described in detail here
So far I've been testing a small dataset to control water temperature that is quite easy ...
1
vote
1
answer
929
views
using a variable to index an array
I'm using the keypad library to return a number 1-9. (im fairly sure this returns an int)
I have an array (data) showing the state of each button press.
so i would like the number returned by the ...
1
vote
1
answer
881
views
How to add two assembly arrays in arduino
Hey guys what I'm trying to do is to sum two arrays and return a new array; for example if given
uint8_t a[] = {2, 4, 6};
uint8_t b[] = {1, 2, 3};
I should get { 3, 6, 9} What I'm trying to do is ...
0
votes
1
answer
661
views
String array length in function
I know this question has been asked a thousand times, but I can't find a solution for my case.
I what to get the length of a string array in a given function. This is for an arduino board.
#define LEN(...
1
vote
0
answers
63
views
Multidimensional array with date and numbers
I would like to create something similar to a multidimensional array.
I would like to get this effect.
setting = [
0 => [// 0 is the day of the week, but it can be a number
'1:25' =&...
0
votes
2
answers
1k
views
Replacing large lookup table with switch statement
My arduino needs to take a 14-bit number and convert it to a 10-bit number. Can't use a formula for it since the data is quite random. So I created a lookup table with 2^14 elements, each containing a ...
-1
votes
1
answer
296
views
light leds from an array
I have the project to build a robot for my school. It will record button pushes then move according to this record.
Before usig motors, i'm trying to do this using leds.
Thanks from posts from this ...
1
vote
1
answer
635
views
How to set current position for the DC motor to zero + store current positions in an array and run it?
I would like to know how to set the current position for the DC motors to zero and store the current position in an array. after that I would like it to loop in the array to run all steps that was ...
0
votes
1
answer
5k
views
How to return Char Array Value in Arduino IDE Function?
Function
char* getConnectDetail(int starting){
String data;
for(int i=0;i< 1024 ;i++) {
if(EEPROM.read(i+starting) != 0){
data += char(EEPROM.read(i+starting));
}
}
int ...
1
vote
1
answer
4k
views
USing arrays, binary data and bitRead
This is my first manually typed code. I'm sure there may be some glaring "schoolboy errors" in it, so wondered if people could give it the 'once over' In particular, I have never used C++ arrays, ...