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

# Pyre type checker # Pyre type checker
.pyre/ .pyre/


# VSCode
.vscode/*

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

{ {
"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

import time import time


mqttBroker = "mqtt.eclipseprojects.io" mqttBroker = "mqtt.eclipseprojects.io"
client = mqtt.Client("Temperature")
client.connect(mqttBroker)
client1 = mqtt.Client("Temperature")
client1.connect(mqttBroker)


while True: while True:
randNumber = random.randint(0, 20) randNumber = random.randint(0, 20)
client.publish("TEMPERATURE", randNumber)
client1.publish("TEMPERATURE", randNumber)
print("Published " + str(randNumber) + " to topic TEMPERATURE") 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) time.sleep(2)

Loading…
Cancel
Save