working chat and robot contoller

master
adligeerik 5 years ago
parent 95892796ed
commit 54833c1c9d

@ -7,6 +7,7 @@ import socket, select
import re import re
from time import sleep from time import sleep
""" """
Six actuators: Six actuators:
linear rail linear rail
@ -249,22 +250,22 @@ def updateLoop():
def rt(): def rt():
adjustSpeed(1, 5)
def lt():
adjustSpeed(1, -5) adjustSpeed(1, -5)
def fw(): def lt():
adjustSpeed(2, 5) adjustSpeed(1, 5)
def bc(): def bc():
adjustSpeed(2, -5) adjustSpeed(2, -5)
def fw():
adjustSpeed(2, 5)
def up(): def up():
adjustSpeed(3, 5) adjustSpeed(3, -5)
def dn(): def dn():
adjustSpeed(3, -5) adjustSpeed(3, 5)
def lr(): def lr():
adjustSpeed(4, 10) adjustSpeed(4, 10)
@ -325,9 +326,8 @@ def stop():
# #
############################### Chat Parser Section ###############################
with open('twitch_key.json', 'rb') as json_data:
with open('/Users/pawel/Documents/Junction2018/twitch_key.json', 'rb') as json_data:
data = json.load(json_data) data = json.load(json_data)
primary_stream_key = data["primary_stream_key"] primary_stream_key = data["primary_stream_key"]
oauth_key = data["oauth_key"]# bytes('oauth:gcpsl3csq85rf3lk8c1ijzer8deuat', "utf8") oauth_key = data["oauth_key"]# bytes('oauth:gcpsl3csq85rf3lk8c1ijzer8deuat', "utf8")
@ -417,18 +417,10 @@ while True:
else: else:
print("Something is TERRIBLY wrong!") print("Something is TERRIBLY wrong!")
print("Location 3")
print(queue)
# removing the first item from queue # removing the first item from queue
queue = queue[1:] queue = queue[1:]
print("Location 4")
print(queue)
sleep(1) sleep(1)

Loading…
Cancel
Save