From 51b9ed949c455c96c97fbf32c3a79cf1a5cc8792 Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Sat, 1 Sep 2018 09:21:20 +0200 Subject: [PATCH] add status led pin and sumo server to config --- config.json | 4 +++- main.py | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index ec5bdfb..86c5924 100755 --- a/config.json +++ b/config.json @@ -1,12 +1,14 @@ { - "status_led": 22, + "status_led_pin": 22, "battery_coeff": 2.25, + "sumo_id": "xxxxxxxx", "left_servo_tuning": 33, "right_servo_tuning": 33, "blockly_highlight": true, "ultrasonic_distance": 40, "left_line_threshold": 1000, "right_line_threshold": 1000, + "sumo_server": "ws://ws.achex.ca:4010" "wifis": { "RoboKoding": "salakala" } diff --git a/main.py b/main.py index 02d5cbe..b596e2b 100755 --- a/main.py +++ b/main.py @@ -5,10 +5,8 @@ import uwebsockets # Extract a unique name for the robot from the device MAC address mac = ubinascii.hexlify(wlan.config("mac")[-3:]).decode("ascii") -# Remote server -url = "ws://ws.achex.ca:4010" -# Local server -#url = "ws://192.168.2.1:80/p2p/sumo-%s/browser/" % mac +# SumoRobot server +server_url = config["sumo_server"] # Code to execute ast = ""