add status led pin and sumo server to config
This commit is contained in:
parent
e05f15faf5
commit
51b9ed949c
@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"status_led": 22,
|
"status_led_pin": 22,
|
||||||
"battery_coeff": 2.25,
|
"battery_coeff": 2.25,
|
||||||
|
"sumo_id": "xxxxxxxx",
|
||||||
"left_servo_tuning": 33,
|
"left_servo_tuning": 33,
|
||||||
"right_servo_tuning": 33,
|
"right_servo_tuning": 33,
|
||||||
"blockly_highlight": true,
|
"blockly_highlight": true,
|
||||||
"ultrasonic_distance": 40,
|
"ultrasonic_distance": 40,
|
||||||
"left_line_threshold": 1000,
|
"left_line_threshold": 1000,
|
||||||
"right_line_threshold": 1000,
|
"right_line_threshold": 1000,
|
||||||
|
"sumo_server": "ws://ws.achex.ca:4010"
|
||||||
"wifis": {
|
"wifis": {
|
||||||
"RoboKoding": "salakala"
|
"RoboKoding": "salakala"
|
||||||
}
|
}
|
||||||
|
6
main.py
6
main.py
@ -5,10 +5,8 @@ import uwebsockets
|
|||||||
# Extract a unique name for the robot from the device MAC address
|
# Extract a unique name for the robot from the device MAC address
|
||||||
mac = ubinascii.hexlify(wlan.config("mac")[-3:]).decode("ascii")
|
mac = ubinascii.hexlify(wlan.config("mac")[-3:]).decode("ascii")
|
||||||
|
|
||||||
# Remote server
|
# SumoRobot server
|
||||||
url = "ws://ws.achex.ca:4010"
|
server_url = config["sumo_server"]
|
||||||
# Local server
|
|
||||||
#url = "ws://192.168.2.1:80/p2p/sumo-%s/browser/" % mac
|
|
||||||
|
|
||||||
# Code to execute
|
# Code to execute
|
||||||
ast = ""
|
ast = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user