hallo leute ich habe mir für ein projekt einen arduino micro geholt es geht dabei um eine neopixel uhr
hier der code
#include <Wire.h>
#include <RTClib.h>
#include <Adafruit_NeoPixel.h>
#define NEOPIN 3
#define BRIGHTNESS 50
RTC_DS1307 RTC;
DateTime Clock;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, NEOPIN, NEO_GRB + NEO_KHZ800);
byte hourval, minuteval, secondval;
byte pixelColorRed, pixelColorGreen, pixelColorBlue;
void setup () {
Wire.begin();
RTC.begin();
pinMode(NEOPIN, OUTPUT);
if (! RTC.isrunning()) {
RTC.adjust(DateTime(__DATE__, __TIME__));
}
strip.begin();
strip.setBrightness(BRIGHTNESS);
delay(500);
colorWipe(strip.Color(255, 0, 0), 20);
colorWipe(strip.Color(0, 255, 0), 20);
colorWipe(strip.Color(0, 0, 255), 20);
delay(500);
}
void loop () {
char* colon = ":";
char* slash = "/";
Clock = RTC.now();
secondval = Clock.second();
minuteval = Clock.minute();
hourval = Clock.hour();
if (hourval > 11) hourval -= 12;
hourval = (hourval * 60 + minuteval) / 12;
for (uint8_t i = 0; i < strip.numPixels(); i++) {
if (i <= secondval) {
pixelColorBlue = (i + 1) * (255 / (secondval + 1));
}
else {
pixelColorBlue = 0;
}
if (i <= minuteval) {
pixelColorGreen = (i + 1) * (255 / (minuteval + 1));
}
else {
pixelColorGreen = 0;
}
if (i <= hourval) {
pixelColorRed = (i + 1) * (255 / (hourval + 1));
}
else {
pixelColorRed = 0;
}
strip.setPixelColor(i, strip.Color(pixelColorRed, pixelColorGreen, pixelColorBlue));
}
strip.show();
delay(100);
}
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
jetzt habe ich das problem das es auf dem uno läuft und der micro einfach zur platzersparniss dient....
beim umstellen des boardverwalters auf micro und dem versuch es hochzuladen bekam ich folgende fehler
Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Micro"
WARNUNG: Kategorie 'Real-time clock' in der Bibliothek DS3231 ist ungültig und wird auf 'Uncategorized' festgelegt
C:\Users\Helma\Documents\Arduino\neopixeluhrV2\neopixeluhrV2.ino: In function 'void loop()':
C:\Users\Helma\Documents\Arduino\neopixeluhrV2\neopixeluhrV2.ino:50:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char* colon = ":"; // static characters save a bit
^
C:\Users\Helma\Documents\Arduino\neopixeluhrV2\neopixeluhrV2.ino:51:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char* slash = "/"; // of memory
^
Der Sketch verwendet 8430 Bytes (29%) des Programmspeicherplatzes. Das Maximum sind 28672 Bytes.
Globale Variablen verwenden 418 Bytes (16%) des dynamischen Speichers, 2142 Bytes für lokale Variablen verbleiben. Das Maximum sind 2560 Bytes.
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "S"; type = p
Software Version = V.
woran liegt das habe keine erfahrung bisher mit dem micro.
danke schonmal für eure hilfe