@@ -0,0 +1,1642 @@
+#!/usr/bin/env python3%0A%0Aimport logging%0Aimport math%0Aimport os%0Aimport random%0Aimport threading%0Aimport time%0Afrom datetime import datetime, timedelta%0A%0Aimport LightSchedule%0Aimport PCA9685%0Aimport PCA9685_dummy%0Aimport Pid%0Aimport Settings%0Afrom WeatherType import WeatherType%0A%0A%0A# Initialise the PCA9685, if cant use a dummy (for testing on machine that is not pi)%0Atry:%0A    pwm = PCA9685.PCA9685()%0A    # Alternatively specify a different address and/or bus:%0A    #pwm = Adafruit_PCA9685.PCA9685(address=0x41, busnum=2)%0Aexcept:%0A    msg = %22WARNING - unable to load PWM chip... no values will set!%22%0A    logging.info(msg)%0A    print(msg)%0A    pwm = PCA9685_dummy.PCA9685()%0A%0A%0A%0A# Configure min and max, initial weather pattern%0ALED_MAX = 4095  # Max Brightness%0ALED_MIN = 0     # Min Brightness (off)%0ARUN = True%0AWEATHER = WeatherType.normal%0A%0A%0A# Set frequency to 1000hz... LEDS.%0Apwm.set_pwm_freq(1000)%0Apwm.set_all(LED_MIN)%0Atime.sleep(1)%0A%0Atry:%0A    i = 0%0A    j = 0%0A    while RUN:%0A        %0A        while j %3C LED_MAX:%0A            pwm.set_all(j)%0A            j += 1%0A        while j %3E LED_MIN:%0A            pwm.set_all(j)%0A            j -= 1%0A        time.sleep(1)%0A%0A        for c in range(0,4):%0A            while i %3C LED_MAX:%0A                pwm.set_s(c, min(LED_MAX,i))%0A                i += 1%0A                #time.sleep(.5)%0A                print(i)%0A            time.sleep(1)%0A            while i %3E LED_MIN:%0A                pwm.set_s(c, i)%0A                i -= 1%0A                print(i)%0A            print(%22bottom%22 + str(i))%0A            time.sleep(1)%0Afinally:%0A    logging.info(datetime.now().strftime('%25H:%25M:%25S') + ' : finally Quit')%0A    RUN = False%0A    pwm.set_all(LED_MIN)%0A

add test file