Hi
Ich baue eine Wörteruhr und habe dafür diesen Code geschrieben:
const int wort_1[]={99,100}; //ES
const int wort_2[]={102,103,104}; //IST
const int wort_3[]={106,107,108,109}; //FÜNF
const int wort_4[]={98,97,96,95}; //ZEHN
const int wort_5[]={94,93,92,91,90,89,88}; //ZWANZIG
const int wort_6[]={81,82,83,84,85,86,87}; //VIERTEL
const int wort_7[]={76,75,74}; //VOR
const int wort_8[]={69,68,67,66}; //NACH
const int wort_9[]={55,56,57,58}; //HALB
const int wort_10[]={60,61,62}; //ELF
const int wort_11[]={62,63,64,65}; //FÜNF
const int wort_12[]={54,53,52,51}; //EINS
const int wort_13[]={47,46,45,44}; //ZWEI
const int wort_14[]={33,34,35,36}; //DREI
const int wort_15[]={40,41,42,43}; //VIER
const int wort_16[]={32,31,30,29,28}; //SECHS
const int wort_17[]={25,24,23,22}; //ACHT
const int wort_18[]={11,12,13,14,15,16}; //SIEBEN
const int wort_19[]={17,18,19,20,21}; //ZWÖLF
const int wort_20[]={10,9,8,7}; //ZEHN
const int wort_21[]={7,6,5,4}; //NEUN
const int wort_22[]={2,1,0}; //UHR
const int zeit_1m[]={};
const int zeit_2m[]={};
const int zeit_3m[]={5,25,35,55};
const int zeit_4m[]={10,50};
const int zeit_5m[]={20,40};
const int zeit_6m[]={15,45};
const int zeit_7m[]={25,40,45,50,55};
const int zeit_8m[]={5,10,15,20,35};
const int zeit_9m[]={25,30,35};
const int zeit_10m[]={};
const int zeit_11m[]={};
const int zeit_12m[]={};
const int zeit_13m[]={};
const int zeit_14m[]={};
const int zeit_15m[]={};
const int zeit_16m[]={};
const int zeit_17m[]={};
const int zeit_18m[]={};
const int zeit_19m[]={};
const int zeit_20m[]={};
const int zeit_21m[]={};
const int zeit_22m[]={0};
const int zeit_1h[]={};
const int zeit_2h[]={};
const int zeit_3h[]={};
const int zeit_4h[]={};
const int zeit_5h[]={};
const int zeit_6h[]={};
const int zeit_7h[]={};
const int zeit_8h[]={};
const int zeit_9h[]={};
const int zeit_10h[]={11,23};
const int zeit_11h[]={5,17};
const int zeit_12h[]={1,13};
const int zeit_13h[]={2,14};
const int zeit_14h[]={3,15};
const int zeit_15h[]={4,16};
const int zeit_16h[]={6,18};
const int zeit_17h[]={8,20};
const int zeit_18h[]={7,19};
const int zeit_19h[]={12,0,24};
const int zeit_20h[]={10,22};
const int zeit_21h[]={9,21};
const int zeit_22h[]={};
const int* zeit_m[]={5, 25, 35, 55, 10, 50, 20, 40, 15, 45, 25, 40, 45, 50, 55, 5, 10, 15, 20, 35, 25, 30, 35};
const int* zeit_h[]={11, 23, 5, 17, 1, 13, 2, 14, 3, 15, 4, 16, 6, 18, 8, 20, 7, 19, 12, 0, 24, 10, 22, 9, 21};
const int* wort_LEDs_m[]={wort_3, wort_3, wort_3, wort_3, wort_4, wort_4, wort_5, wort_5, wort_6, wort_6, wort_7, wort_7, wort_7, wort_7, wort_7, wort_8, wort_8, wort_8, wort_8, wort_8, wort_9, wort_9, wort_9};
const int* wort_LEDs_h[]={wort_10, wort_10, wort_11, wort_11, wort_12, wort_12, wort_13, wort_13, wort_14, wort_14, wort_15, wort_15, wort_16, wort_16, wort_17, wort_17, wort_18, wort_18, wort_19, wort_19, wort_19, wort_20, wort_20, wort_21, wort_21};
int Anzahlwoerter = 22;
#include <NTPClient.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
const char *ssid = "Glattalp";
const char *password = "toedel99%";
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "ch.pool.ntp.org", 7200, 60000);
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define PIN 14 // Anschluss PIN
#define NUMPIXELS 110 //Anzahl LED's
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#include <sstream>
#include <string>
#include <iostream>
void setup(){
Serial.begin(115200);
WiFi.begin(ssid, password);
while ( WiFi.status() != WL_CONNECTED ) {
delay ( 500 );
Serial.print ( "." );
}
pixels.begin();
}
void loop(){
const int minuten = timeClient.getMinutes();
const int stunden = timeClient.getHours();
pixels.show();
for (int Wort = 0; Wort < Anzahlwoerter; Wort++) {
if(*zeit_m[Wort] == minuten) {
pixels.setPixelColor(*wort_LEDs_m[Wort], pixels.Color(150, 150, 150));
}
}
for (int Wort = 0; Wort < Anzahlwoerter; Wort++) {
if(*zeit_h[Wort] == stunden ) {
pixels.setPixelColor(*wort_LEDs_h[Wort], pixels.Color(150, 150, 150));
}
}
timeClient.update();
Serial.print(stunden);
Serial.print(":");
Serial.print(minuten);
Serial.println();
}
bei der Zeile: const int* zeit_h[]={11, 23, 5, 17, 1, 13, 2, 14, 3, 15, 4, 16, 6, 18, 8, 20, 7, 19, 12, 0, 24, 10, 22, 9, 21};
es kommt nun diese Nachricht: invalid conversion from 'int' to 'const int*' [-fpermissive]
was habe ich falsch gemacht?
Danke fürs Helfen
Selectronics 50