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