This commit is contained in:
Lukas Schulz 2020-12-19 22:08:07 +01:00
parent eea1ae87e9
commit ca35eb7c9a

13
main.py
View file

@ -4,6 +4,8 @@ import spotipy.util as util
import config as cfg
from PIL import Image
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import requests
from io import BytesIO
@ -14,6 +16,17 @@ username = cfg.username
scope = 'user-read-currently-playing'
options = RGBMatrixOptions()
options.rows = 32
options.cols = 64
options.chain_length = 6
options.parallel = 2
options.hardware_mapping = 'regular'
options.pixel_mapper_config = 'U-mapper'
options.limit_refresh_rate_hz = 240
options.gpio_slowdown = 4
self.screen = RGBMatrix(options = options) #pygame.display.set_mode(self.size, self.flags)
token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)