-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRun.py
More file actions
27 lines (21 loc) · 726 Bytes
/
Run.py
File metadata and controls
27 lines (21 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import json
from Capture import Capture
from ImageProcessor import ImageProcessor
from LedStrip import LedStrip
from Functions import *
# Configuration
VERSION = '0.1.0.0'
run = True
config = json.load(open('config.json'))
# Header
print('ambiPy v.' + VERSION + ' by Aleksander Heese \n' + breakText())
# Creating controlers
print('Creating controlers')
cap = Capture()
imgProc = ImageProcessor(config['layout']['horizontal'],config['layout']['vertical'])
ledStrip = LedStrip(config['preconfig']['ledPort'])
# Test
print(imgProc.calculateColors(imgProc.processImageArray(cap.captureImageArray())))
ledStrip.showLeds(imgProc.calculateColors(imgProc.processImageArray(cap.captureImageArray())))
#while(run):
#print('')