Endlich klappt es so wie ich es ungefähr wollte. Vielen Dank erstmal
dafür.
Will ich jetzt aber mein neues Array mit meinem Original Array
vergleichen kommt folgende Fehlermeldung:
1 | #include <Bounce.h>
|
2 | const int buttonPinRot = 4;
|
3 | const int buttonPinBlau = 5;
|
4 | int rot = 0;
|
5 | int blau = 0;
|
6 | int bpr = buttonPinRot; //PinShorts
|
7 | int bpb = buttonPinBlau;
|
8 | int i= 0;
|
9 | const char Muster1[5] = {
|
10 | rot, blau, blau, rot, rot};
|
11 | char Muster1vgl[5]={
|
12 | };
|
13 | //
|
14 | //=========================================Setup===============================================================================
|
15 | //
|
16 | void setup() {
|
17 | pinMode(buttonPinRot, INPUT); //PinModeDeclarations
|
18 | pinMode(buttonPinBlau, INPUT);
|
19 | Serial.begin(9600); // debug
|
20 |
|
21 | }
|
22 | //
|
23 | //=========================================Loop===============================================================================
|
24 | //
|
25 | void loop() {
|
26 |
|
27 | EingabeCheck1();
|
28 | Serial.println("Fertig");
|
29 | if ((Muster1[0] = Muster1vgl[0]) && (Muster1[1] = Muster1vgl[1]) && (Muster1[2] = Muster1vgl[2]) && (Muster1[3] = Muster1vgl[3])
|
30 | && (Muster1[0] = Muster1vgl[0])) {
|
31 | Serial.println("SUCCESS");
|
32 | }
|
33 |
|
34 | }
|
Cache_ArrayChange.ino: In function 'void loop()':
Cache_ArrayChange:29: error: assignment of read-only location
'Muster1[0]'
Cache_ArrayChange:29: error: assignment of read-only location
'Muster1[1]'
Cache_ArrayChange:29: error: assignment of read-only location
'Muster1[2]'
Cache_ArrayChange:29: error: assignment of read-only location
'Muster1[3]'
Cache_ArrayChange:30: error: assignment of read-only location
'Muster1[4]'