Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/caliskanbi83990/projektarbeit_duelger_waldhauser_caliskan
This commit is contained in:
commit
e975585f57
Binary file not shown.
@ -52,11 +52,11 @@ def main():
|
|||||||
datefmt="%d-%m-%Y %H:%M:%S")
|
datefmt="%d-%m-%Y %H:%M:%S")
|
||||||
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
|
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
|
||||||
|
|
||||||
client = mqtt.Client(RASPI_CLIENT_ID)
|
# client = mqtt.Client(RASPI_CLIENT_ID)
|
||||||
# client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker
|
client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker
|
||||||
client.on_connect = on_connect
|
client.on_connect = on_connect
|
||||||
client.connect(MQTT_BROKER_GLOBAL)
|
# client.connect(MQTT_BROKER_GLOBAL)
|
||||||
# client.connect("192.168.137.197") # Local Broker
|
client.connect("192.168.137.197") # Local Broker
|
||||||
|
|
||||||
logging.info("Robot initialised")
|
logging.info("Robot initialised")
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 897 KiB |
@ -146,7 +146,8 @@ def takePicture():
|
|||||||
try:
|
try:
|
||||||
camera = PiCamera()
|
camera = PiCamera()
|
||||||
except:
|
except:
|
||||||
raise Exception("Camera not connected")
|
# raise Exception("Camera not connected")
|
||||||
|
pass
|
||||||
|
|
||||||
camera.start_preview()
|
camera.start_preview()
|
||||||
camera.capture("picture.png")
|
camera.capture("picture.png")
|
||||||
@ -171,7 +172,7 @@ def readPosition():
|
|||||||
def main():
|
def main():
|
||||||
value = SENSORDATA
|
value = SENSORDATA
|
||||||
try:
|
try:
|
||||||
value |= readSensors()
|
readSensors(value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user