Hi guys, I'm trying to use my RTC to control LED's. For example at a certain time the LED's will change colour. I am getting the following issue "expected primary-expression before ' , ' token." on the lines
{
else
digitalWrite(uint32_t, LOW);
}
Any help would be great
Thanks
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 rtc;
#include <Adafruit_NeoPixel.h>
#define PIN 3
#define NUM_LIGHTS 24
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LIGHTS, PIN, NEO_GRB + NEO_KHZ800);
void setup () {
strip.begin();
strip.setBrightness(100);
strip.show();
Serial.begin(57600);
#ifdef AVR
Wire.begin();
#else
Wire1.begin(); // Shield I2C pins connect to alt I2C bus on Arduino Due
#endif
rtc.begin();
if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
// rtc.adjust(DateTime(F(DATE), F(TIME)));
// This line sets the RTC with an explicit date & time, for example to set
// January 21, 2014 at 3am you would call:
// rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
}}
void loop () {
// put your main code here, to run repeatedly:
uint32_t low = strip.Color(255, 100, 0);
uint32_t high = strip.Color(255, 0, 0);
// uint32_t night = strip.Color(255, 0, 0);
// Turn them off
//for( int i = 0; i<NUM_LIGHTS; i++){
//strip.setPixelColor(i, high);
//strip.show();}
DateTime now = rtc.now();
Serial.print(now.day(), DEC);
Serial.print('-');
Serial.print(now.month(), DEC);
Serial.print('-');
Serial.print(now.year(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
// if the time/date is at the given point, rLED will be on, else it will be off
if(now.minute() == 20) {
digitalWrite(uint32_t, HIGH);
}
{
else
digitalWrite(uint32_t, LOW);
}
Serial.println();
delay(1000);
}