From 43226a9046fe62f310fd85d8a9738db2cc6027f1 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 1 Apr 2022 17:39:15 +0700 Subject: [PATCH] update constants --- ambilight_mulitprocessing.py | 5 +++-- rainbow.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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()