Browse Source

Robot Docu updated

master
waldluis 1 year ago
parent
commit
99b1bbb065

BIN
documentation/Robot.docx View File


+ 1986
- 105
documentation/SmartGardeningProjekt.mdj
File diff suppressed because it is too large
View File


+ 1
- 1
software/roboter/raspy/functions.py View File

clients.publish(Topics["ROBOT_DATA_POSITION"], json.dumps(position, indent=4), qos=1) clients.publish(Topics["ROBOT_DATA_POSITION"], json.dumps(position, indent=4), qos=1)




def get_BatteryStatus(client: mqtt.Client, userdata, message: mqtt.MQTTMessage):
def get_batteryStatus(client: mqtt.Client, userdata, message: mqtt.MQTTMessage):
""" """
Callback function for battery status request Callback function for battery status request
Function to read battery status from ev3 and send via MQTT in form of BATTERY Function to read battery status from ev3 and send via MQTT in form of BATTERY

+ 1
- 1
software/roboter/raspy/mainProg.py View File

#Add callbacks #Add callbacks
client.message_callback_add(Topics["ROBOT_ACTION_DRIVE"], functions.drive_plant) client.message_callback_add(Topics["ROBOT_ACTION_DRIVE"], functions.drive_plant)
client.message_callback_add(Topics["ROBOT_ACTION_GETPOSITION"], functions.get_position) client.message_callback_add(Topics["ROBOT_ACTION_GETPOSITION"], functions.get_position)
client.message_callback_add(Topics["ROBOT_ACTION_GETBATTERY"], functions.get_BatteryStatus)
client.message_callback_add(Topics["ROBOT_ACTION_GETBATTERY"], functions.get_batteryStatus)
client.message_callback_add(Topics["ROBOT_ACTION_DRIVEALL"], functions.drive_plant_all) client.message_callback_add(Topics["ROBOT_ACTION_DRIVEALL"], functions.drive_plant_all)


#Subscribe to topics #Subscribe to topics

Loading…
Cancel
Save