diff --git a/ambilight_mulitprocessing.py b/ambilight_mulitprocessing.py index 54f9e0b..723d7b2 100644 --- a/ambilight_mulitprocessing.py +++ b/ambilight_mulitprocessing.py @@ -1,3 +1,4 @@ +import multiprocessing from tkinter import TOP import pyautogui import scipy.cluster as cluster @@ -25,8 +26,8 @@ MIN_TIME = 0.05 METHOD = 'MEDIAN' #MEAN/MEDIAN/MODE/CLUSTER_MEAN, WARNING: CLUSTER_MEAN might burn down your house. SATURATION_BOOST_FACTOR = 2 NUM_CLUSTERS = 3 -KMEAN_QUALITY = 50 -NUM_THREADS = 16 +KMEAN_QUALITY = 50 +NUM_THREADS = 8 if __name__ == '__main__': board = telemetrix_rpi_pico.TelemetrixRpiPico() diff --git a/rainbow.py b/rainbow.py index 964e3cd..3fbbe77 100644 --- a/rainbow.py +++ b/rainbow.py @@ -21,8 +21,8 @@ timecounter = 0 while(True): for j in range(0,NUM_LEDS): - r, g, b = colorsys.hsv_to_rgb(((-timecounter*VELOCITY+j*4)%360)/360,1,1) + r, g, b = colorsys.hsv_to_rgb(((-timecounter*VELOCITY+j*2)%360)/360,1,1) board.neo_pixel_set_value(j,r=int(r*255),g=int(g*255),b=int(b*255)) timecounter+=1 - delay(0.1) + delay(0.05) board.neopixel_show()