From 7b9f560da558fad1367d8a88749fc8222fd6bd60 Mon Sep 17 00:00:00 2001 From: waldhauserlu78556 Date: Mon, 3 Apr 2023 10:25:46 +0200 Subject: [PATCH] Updated GitIgnore --- .gitignore | 2 ++ .vscode/settings.json | 22 +++++++++++++++++++++- software/roboter/raspy/mqtt_publish1.py | 11 ++++++++--- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e61bca2..661cc77 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,5 @@ dmypy.json # Pyre type checker .pyre/ +# VSCode +.vscode/* \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 9f2dce2..042e37c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,23 @@ { - "github-enterprise.uri": "https://git.efi.th-nuernberg.de" + "github-enterprise.uri": "https://git.efi.th-nuernberg.de", + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#ab307e", + "activityBar.background": "#ab307e", + "activityBar.foreground": "#e7e7e7", + "activityBar.inactiveForeground": "#e7e7e799", + "activityBarBadge.background": "#25320e", + "activityBarBadge.foreground": "#e7e7e7", + "commandCenter.border": "#e7e7e799", + "sash.hoverBorder": "#ab307e", + "statusBar.background": "#832561", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#ab307e", + "statusBarItem.remoteBackground": "#832561", + "statusBarItem.remoteForeground": "#e7e7e7", + "titleBar.activeBackground": "#832561", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#83256199", + "titleBar.inactiveForeground": "#e7e7e799" + }, + "peacock.remoteColor": "#832561" } \ No newline at end of file diff --git a/software/roboter/raspy/mqtt_publish1.py b/software/roboter/raspy/mqtt_publish1.py index 9ab8174..cc53700 100644 --- a/software/roboter/raspy/mqtt_publish1.py +++ b/software/roboter/raspy/mqtt_publish1.py @@ -3,11 +3,16 @@ import random import time mqttBroker = "mqtt.eclipseprojects.io" -client = mqtt.Client("Temperature") -client.connect(mqttBroker) +client1 = mqtt.Client("Temperature") +client1.connect(mqttBroker) while True: randNumber = random.randint(0, 20) - client.publish("TEMPERATURE", randNumber) + client1.publish("TEMPERATURE", randNumber) print("Published " + str(randNumber) + " to topic TEMPERATURE") + time.sleep(2) + + randNumber = random.randint(0, 100) + client1.publish("HUMIDITY", randNumber) + print("Published " + str(randNumber) + " to topic HUMIDITY") time.sleep(2) \ No newline at end of file