Refers to code that present variables in the form of an array.
0
votes
2answers
21 views
Removing Element From Array While Keeping Order
I'm building a wireless mechanical keyboard. There is an array of 6 elements that stores the keys pressed by the user (since 6 is the max number of keys you can send at once over Bluetooth). An ...
0
votes
2answers
20 views
Iterating an array of relays
Bear with me as I'm fairly adept at C# but I am having a problem understanding how to get an array iterated.
I am writing a program to test relay boards, it will eventually have an input mechanism to ...
0
votes
1answer
44 views
How to convert array of chars to array of ints?
I have a rather newbie question but I can't figure it out.
Lets say I have this char array:
char array[] = "10,11,12,1,0,1,0";
How can I convert it to an array of int like this?
int arrayINT[] ...
1
vote
2answers
47 views
Append Text to Variable Names: Please Help Me Shorten This Code
I'm trying to shorten the code under "setup" below, where I have over 120 variables that are being read from an external EEPROM. There is a pattern where the variable that stores the position of the ...
-3
votes
1answer
101 views
How do I learn C? (was Computer project) [closed]
Can you help me writing a code for this question guys??
You have an Arduino Uno with 8 LEDs connected to digital pins 2 to 9.
Create an array of 8 elements. Fill it with random numbers between 2 and 9 ...
5
votes
2answers
67 views
Works with gcc, not with Arduino. error: taking address of temporary array
I need to hard code 8 byte addresses into char arrays of length 8. This must be done many places in my code (in function scope), so I have tried to come up with a one-liner. The following works ...
0
votes
1answer
43 views
Dot Matrix Display with Arduino UNO (PROBLEM)
hi guys i faced a problem in my graduation project and I hope you can help me to solve it :)
...
my project is connecting Arduino uno to 16x32 Dot Matrix Display(DMD) and display messages on it from ...
0
votes
2answers
48 views
Iterate an Object Array
I'm trying to create an array of objects and later iterate over it and do something with each object. My C++ skills just don't go far enough.
Here's what I have so far. I've tried to strip out all ...
2
votes
2answers
100 views
How can I pass a char array as the parameter to a function?
I am creating a menu for adjusting system variables.
The menu is made up of pointers like so:
char* options4[] = {"hMin1", "hMax1", "refr1", "fSpeed1"};
I want to pass the selected string as the ...
0
votes
1answer
65 views
Copy content of array
This may be an easy question, and if so im sorry, but i couldn't find out how to do this. I've programmed in python before and hoped that this would work, but it don't.
int myArray1[] = {0, 2, 4, 5, ...
0
votes
1answer
52 views
Why I cannot change array values even if a statement is successfully called? TFT Touch Screen
#include <Adafruit_GFX.h> // Core graphics library
#include "LGDP4535.h" // Hardware-specific library
#include <zTouchScreen.h>
#define BOXSIZE 40
// Assign human-readable names to ...
0
votes
2answers
30 views
Declare for loop as an array of variables [duplicate]
My goal is to store the variable in the for loop as an array rather than as a single 'ultrasoundValue'. Can some one help me structure the code?
I have this code:
int ultraSoundSignalPins[] = ...
0
votes
2answers
89 views
Array of Strings and Callbacks
I am trying to create an array of structs that contain pairs of Strings and Callbacks the problem I am having is assigning the callback function. I have the following code:
#define UI_ROUTINE_ITEMS ...