Kemal Duelger 1 year ago
parent
commit
e975585f57

BIN
documentation/Robot.docx View File


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

@@ -52,11 +52,11 @@ def main():
datefmt="%d-%m-%Y %H:%M:%S")
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))

client = mqtt.Client(RASPI_CLIENT_ID)
# client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker
# client = mqtt.Client(RASPI_CLIENT_ID)
client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker
client.on_connect = on_connect
client.connect(MQTT_BROKER_GLOBAL)
# client.connect("192.168.137.197") # Local Broker
# client.connect(MQTT_BROKER_GLOBAL)
client.connect("192.168.137.197") # Local Broker

logging.info("Robot initialised")


BIN
software/roboter/raspy/picture.png View File


+ 3
- 2
software/roboter/raspy/raspy_sensors.py View File

@@ -146,7 +146,8 @@ def takePicture():
try:
camera = PiCamera()
except:
raise Exception("Camera not connected")
# raise Exception("Camera not connected")
pass
camera.start_preview()
camera.capture("picture.png")
@@ -171,7 +172,7 @@ def readPosition():
def main():
value = SENSORDATA
try:
value |= readSensors()
readSensors(value)
except Exception as e:
print(str(e))


Loading…
Cancel
Save