import time, network
from mqtt import MQTTClient

SSID='mux' # Network SSID
KEY='j806fVnT7tObdCYE'  # Network key

# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")

wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)

# We should have a valid IP now via DHCP
print(wlan.ifconfig())

client = MQTTClient("openmv", "test.mosquitto.org", port=1883)
client.connect()

while (True):
    client.publish("openmv/test", "Hello World!")
    time.sleep(1000)

import time, network
from mqtt import MQTTClient

SSID='' # Network SSID
KEY=''  # Network key

# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")

wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)

# We should have a valid IP now via DHCP
print(wlan.ifconfig())

client = MQTTClient("openmv", "test.mosquitto.org", port=1883)
client.connect()

while (True):
    client.publish("openmv/test", "Hello World!")
    time.sleep(1000)

Remove ssid/key from example script.
Remove ssid/key from example script.

  import time, network
  from mqtt import MQTTClient
  
- SSID='mux' # Network SSID
+ SSID='' # Network SSID
- KEY='j806fVnT7tObdCYE'  # Network key
+ KEY=''  # Network key
  
  # Init wlan module and connect to network
  print("Trying to connect... (may take a while)...")
  
  wlan = network.WINC()
  wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)
  
  # We should have a valid IP now via DHCP
  print(wlan.ifconfig())
  
  client = MQTTClient("openmv", "test.mosquitto.org", port=1883)
  client.connect()
  
  while (True):
      client.publish("openmv/test", "Hello World!")
      time.sleep(1000)
  
Remove ssid/key from example script.
## Code Before:
import time, network
from mqtt import MQTTClient

SSID='mux' # Network SSID
KEY='j806fVnT7tObdCYE'  # Network key

# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")

wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)

# We should have a valid IP now via DHCP
print(wlan.ifconfig())

client = MQTTClient("openmv", "test.mosquitto.org", port=1883)
client.connect()

while (True):
    client.publish("openmv/test", "Hello World!")
    time.sleep(1000)

## Instruction:
Remove ssid/key from example script.
## Code After:
import time, network
from mqtt import MQTTClient

SSID='' # Network SSID
KEY=''  # Network key

# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")

wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)

# We should have a valid IP now via DHCP
print(wlan.ifconfig())

client = MQTTClient("openmv", "test.mosquitto.org", port=1883)
client.connect()

while (True):
    client.publish("openmv/test", "Hello World!")
    time.sleep(1000)
