Browse Source

Updated GitIgnore

master
Luis Waldhauser 1 year ago
parent
commit
7b9f560da5
3 changed files with 31 additions and 4 deletions
  1. 2
    0
      .gitignore
  2. 21
    1
      .vscode/settings.json
  3. 8
    3
      software/roboter/raspy/mqtt_publish1.py

+ 2
- 0
.gitignore View File

@@ -114,3 +114,5 @@ dmypy.json
# Pyre type checker
.pyre/

# VSCode
.vscode/*

+ 21
- 1
.vscode/settings.json View File

@@ -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"
}

+ 8
- 3
software/roboter/raspy/mqtt_publish1.py View File

@@ -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)

Loading…
Cancel
Save