ev3 First Testfiles
This commit is contained in:
@@ -6,6 +6,15 @@ from raspySensors import RaspySensors
|
||||
sensors = RaspySensors()
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region
|
||||
|
||||
def measureSendData():
|
||||
'''Measure Data via sensor class and send via MQTT'''
|
||||
sensorData = sensors.readSensors()
|
||||
client.publish("Robot/Data", json.dumps(sensorData, indent=4))
|
||||
|
||||
#endregion
|
||||
|
||||
#region MQTT callbacks
|
||||
@@ -14,8 +23,15 @@ def send_data_json(client, userdata, message):
|
||||
dataDict = json.loads(strIn)
|
||||
print("Received data: ", json.dumps(dataDict))
|
||||
|
||||
#Function for all Plants or one which changes according to request
|
||||
def drive_plant_1(clients, userdata, message):
|
||||
#TODO Start drive forward
|
||||
print("Driving to plant 1")
|
||||
measureSendData()
|
||||
#TODO Start Drive Back Function
|
||||
print("Driving back to start position")
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user