diff --git a/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/Video links.txt b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/Video links.txt new file mode 100644 index 0000000..a795428 --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/Video links.txt @@ -0,0 +1,9 @@ + + +How to Use Shodan for Beginners! +https://www.youtube.com/watch?v=i7PIyCq_VU4 + +[DEFCON 20] Drinking From the Caffeine Firehose We Know as Shodan +https://www.youtube.com/watch?v=t8nkkVoEo88 + + diff --git a/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/links.txt b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/links.txt new file mode 100644 index 0000000..121142e --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/links.txt @@ -0,0 +1,14 @@ + +How to Use Shodan for Beginners! +https://www.youtube.com/watch?v=i7PIyCq_VU4 + +DEF CON 20 - Viss - Drinking From the Caffeine Firehose We Know as Shodan +https://www.youtube.com/watch?v=-T-3buBwMEQ + +Optional Material + +Shodan Search Engine Tutorial - Access Routers,Servers,Webcams + Install CL +https://www.youtube.com/watch?v=v2EdwgX72PQ + +Hunting for ICS and Other Tricks on Shodan! +https://www.youtube.com/watch?v=bZUnQR4bdT8 \ No newline at end of file diff --git a/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/sir-slammington_shodan.pdf b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/sir-slammington_shodan.pdf new file mode 100644 index 0000000..f159095 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/02 Lab - Shodan/sir-slammington_shodan.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 - Pico W Introduction 2.pdf b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 - Pico W Introduction 2.pdf new file mode 100644 index 0000000..ccf9888 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 - Pico W Introduction 2.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/LED-Connected-to-GP15.jpeg b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/LED-Connected-to-GP15.jpeg new file mode 100644 index 0000000..5ba782b Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/LED-Connected-to-GP15.jpeg differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Lab09Code.tar.gz b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Lab09Code.tar.gz new file mode 100644 index 0000000..9939bf9 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Lab09Code.tar.gz differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/RPI_PICO_W-20240222-v1.22.2.uf2 b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/RPI_PICO_W-20240222-v1.22.2.uf2 new file mode 100644 index 0000000..6ccba3e Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/RPI_PICO_W-20240222-v1.22.2.uf2 differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Raspberry_Pi_Pico_W_Manual01.jpg b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Raspberry_Pi_Pico_W_Manual01.jpg new file mode 100644 index 0000000..6b458e4 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Raspberry_Pi_Pico_W_Manual01.jpg differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Screen Shot 2024-04-05 at 7.56.16 AM.png b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Screen Shot 2024-04-05 at 7.56.16 AM.png new file mode 100644 index 0000000..4f74a66 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/Screen Shot 2024-04-05 at 7.56.16 AM.png differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/WifiConnect.png b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/WifiConnect.png new file mode 100644 index 0000000..1e2a740 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/WifiConnect.png differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/web server gp15.png b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/web server gp15.png new file mode 100644 index 0000000..7a639d2 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/web server gp15.png differ diff --git a/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/webserver1-a.png b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/webserver1-a.png new file mode 100644 index 0000000..87d1fa7 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/09 - ELE128 Lab 09 Pico W Networking and web pages/webserver1-a.png differ diff --git a/ELE128 IoT Networking and Security/Labs/1 - ELE128 Lab 1 - Linux Network Commands.pdf b/ELE128 IoT Networking and Security/Labs/1 - ELE128 Lab 1 - Linux Network Commands.pdf new file mode 100644 index 0000000..d79f358 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/1 - ELE128 Lab 1 - Linux Network Commands.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud.pdf b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud.pdf new file mode 100644 index 0000000..0fd6058 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code.tar.gz b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code.tar.gz new file mode 100644 index 0000000..13e1a17 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code.tar.gz differ diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/circuitpython-blink.py b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/circuitpython-blink.py new file mode 100644 index 0000000..df0964e --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/circuitpython-blink.py @@ -0,0 +1,19 @@ +import board +import digitalio +import time + +led = digitalio.DigitalInOut(board.LED) +led.direction = digitalio.Direction.OUTPUT + +print("Hello, CircuitPython!") + +while True: + + print("On!") + led.value = True + time.sleep(1) + + print("Off!") + led.value = False + time.sleep(1) + diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/dht_simpletest.py b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/dht_simpletest.py new file mode 100755 index 0000000..c00fc7b --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/dht_simpletest.py @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# SPDX-License-Identifier: MIT + +import time +import board +import adafruit_dht + +# Initial the dht device, with data pin connected to: +dhtDevice = adafruit_dht.DHT11(board.GP4) + +# you can pass DHT22 use_pulseio=False if you wouldn't like to use pulseio. +# This may be necessary on a Linux single board computer like the Raspberry Pi, +# but it will not work in CircuitPython. +# dhtDevice = adafruit_dht.DHT22(board.D18, use_pulseio=False) + +while True: + try: + # Print the values to the serial port + temperature_c = dhtDevice.temperature + temperature_f = temperature_c * (9 / 5) + 32 + humidity = dhtDevice.humidity + print( + "Temp: {:.1f} F / {:.1f} C Humidity: {}% ".format( + temperature_f, temperature_c, humidity + ) + ) + + except RuntimeError as error: + # Errors happen fairly often, DHT's are hard to read, just keep going + print(error.args[0]) + time.sleep(2.0) + continue + except Exception as error: + dhtDevice.exit() + raise error + + time.sleep(2.0) diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/sensor2cloud.py b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/sensor2cloud.py new file mode 100755 index 0000000..4c9e52b --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/sensor2cloud.py @@ -0,0 +1,114 @@ +# SPDX-FileCopyrightText: 2022 Liz Clark for Adafruit Industries +# SPDX-License-Identifier: MIT + +import os +import sys +import time +import ssl +import wifi +import socketpool +import microcontroller +import board +import busio +import adafruit_requests +#import adafruit_ahtx0 +import adafruit_dht +from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError +from microcontroller import cpu + +def readDHTSensor(): + runFlag = True + while runFlag: + try: + # Print the values to the serial port + temperature_c = dhtDevice.temperature + temperature_f = temperature_c * (9 / 5) + 32 + humidity = dhtDevice.humidity + print( + "Temp: {:.1f} F / {:.1f} C Humidity: {}% ".format( + temperature_f, temperature_c, humidity + ) + ) + runFlag = False + + except RuntimeError as error: + # Errors happen fairly often, DHT's are hard to read, just keep going + print(error.args[0]) + time.sleep(2.0) + continue + except Exception as error: + dhtDevice.exit() + raise error + + return [temperature_f, humidity, temperature_c] + +# Initial the dht device, with data pin connected to: +dhtDevice = adafruit_dht.DHT11(board.GP4) + + + +wifi.radio.connect(os.getenv('CIRCUITPY_WIFI_SSID'), os.getenv('CIRCUITPY_WIFI_PASSWORD')) + +aio_username = os.getenv('ADAFRUIT_IO_USERNAME') +aio_key = os.getenv('ADAFRUIT_IO_KEY') + +pool = socketpool.SocketPool(wifi.radio) +requests = adafruit_requests.Session(pool, ssl.create_default_context()) +# Initialize an Adafruit IO HTTP API object +io = IO_HTTP(aio_username, aio_key, requests) +print("connected to io") + +# use Pico W's GP0 for SDA and GP1 for SCL +#i2c = busio.I2C(board.GP1, board.GP0) +#aht20 = adafruit_ahtx0.AHTx0(i2c) + +try: +# get feed + picowTemp_feed = io.get_feed("mytemperature") + picowHumid_feed = io.get_feed("myhumidity") +except AdafruitIO_RequestError: +# if no feed exists, create one + print("Feed error") + sys.exit(-1) + +# pack feed names into an array for the loop +feed_names = [picowTemp_feed, picowHumid_feed] +print("Connected to feeds.") + +clock = 300 + + +while True: + try: + # when the clock runs out.. + if clock > 50: + print("") # Prints a blank line after clock print. + # read sensor + dhtData = readDHTSensor() + data = [dhtData[0], dhtData[1]] + # send sensor data to respective feeds + for z in range(2): + io.send_data(feed_names[z]["key"], data[z]) + print("sent %0.1f" % data[z]) + time.sleep(1) + # print sensor data to the REPL + print("\nTemperature: %0.1f C" % data[0]) + print("Humidity: %0.1f %%" % data[1]) + print() + + time.sleep(1) + # reset clock + clock = 0 + else: + clock += 1 + # pylint: disable=broad-except + # any errors, reset Pico W + except Exception as e: + print("Error:\n", str(e)) +# print("Resetting microcontroller in 10 seconds") + time.sleep(3) +# microcontroller.reset() + # delay + time.sleep(1) +# print(clock) + print(clock,end=" ") diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/settings.toml b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/settings.toml new file mode 100755 index 0000000..7ed5a08 --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/settings.toml @@ -0,0 +1,7 @@ +CIRCUITPY_WIFI_SSID = "cset@stcc" +CIRCUITPY_WIFI_PASSWORD = "c1s2e3t4" + + +# Replace the next two lines with your Adafruit username and key. +ADAFRUIT_IO_USERNAME = "csetuser" +ADAFRUIT_IO_KEY = "aio_whil751ZM389iWH4GR20r90cTb0R" diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP.py b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP.py new file mode 100755 index 0000000..6488d3e --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP.py @@ -0,0 +1,31 @@ +import adafruit_connection_manager +import adafruit_ntp +import os +import time +import wifi + + + +wifi_ssid = os.getenv("CIRCUITPY_WIFI_SSID") +wifi_password = os.getenv("CIRCUITPY_WIFI_PASSWORD") +wifi.radio.connect(wifi_ssid, wifi_password) + +pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio) +ntp = adafruit_ntp.NTP(pool, tz_offset=-5, cache_seconds=3600) + +while True: + print(ntp.datetime) + + myTime = {'year':ntp.datetime.tm_year, + 'month': ntp.datetime.tm_mon, + 'day': ntp.datetime.tm_mday, + 'hour': ntp.datetime.tm_hour, + 'min': ntp.datetime.tm_min, + 'sec': ntp.datetime.tm_sec + } + print(myTime) + + time.sleep(10) +# break + + \ No newline at end of file diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP2.py b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP2.py new file mode 100755 index 0000000..da5fbb4 --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/CircuitPython/testNTP2.py @@ -0,0 +1,33 @@ +import adafruit_connection_manager +import adafruit_ntp +import os +import time +import wifi + + + +wifi_ssid = os.getenv("CIRCUITPY_WIFI_SSID") +wifi_password = os.getenv("CIRCUITPY_WIFI_PASSWORD") +wifi.radio.connect(wifi_ssid, wifi_password) + +pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio) +ntp = adafruit_ntp.NTP(pool, tz_offset=-5, cache_seconds=3600) + +while True: + print(ntp.datetime) + + myTime = {'year':ntp.datetime.tm_year, + 'month': ntp.datetime.tm_mon, + 'day': ntp.datetime.tm_mday, + 'hour': ntp.datetime.tm_hour, + 'min': ntp.datetime.tm_min, + 'sec': ntp.datetime.tm_sec + } + if myTime['min'] % 5 == 0: + print("At 5 min") + print(myTime) + time.sleep(60) # Wait until one minute passes, i.e. minute % 5 does not equal 0 + time.sleep(30) # Wait 30 seconds +# break + + \ No newline at end of file diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/adafruit-circuitpython-raspberry_pi_pico_w-en_US-9.0.2.uf2 b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/adafruit-circuitpython-raspberry_pi_pico_w-en_US-9.0.2.uf2 new file mode 100644 index 0000000..7e06dff Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/adafruit-circuitpython-raspberry_pi_pico_w-en_US-9.0.2.uf2 differ diff --git a/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/flash_nuke.uf2 b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/flash_nuke.uf2 new file mode 100644 index 0000000..31291e6 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/10 - ELE128 Lab 10 - Pico W Sensor readings to Cloud/Lab10Code/flash_nuke.uf2 differ diff --git a/ELE128 IoT Networking and Security/Labs/2 - 1.1.1.6 Lab - Shodan Search.docx b/ELE128 IoT Networking and Security/Labs/2 - 1.1.1.6 Lab - Shodan Search.docx new file mode 100644 index 0000000..37130c1 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/2 - 1.1.1.6 Lab - Shodan Search.docx differ diff --git a/ELE128 IoT Networking and Security/Labs/3 - ELE128 Lab 3 - Cisco 3.2.1.4 Lab - Investigate the FCC Database.docx b/ELE128 IoT Networking and Security/Labs/3 - ELE128 Lab 3 - Cisco 3.2.1.4 Lab - Investigate the FCC Database.docx new file mode 100644 index 0000000..52e9561 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/3 - ELE128 Lab 3 - Cisco 3.2.1.4 Lab - Investigate the FCC Database.docx differ diff --git a/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/HP Printer.png b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/HP Printer.png new file mode 100644 index 0000000..1cc99fb Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/HP Printer.png differ diff --git a/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports 111.png b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports 111.png new file mode 100644 index 0000000..99aca15 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports 111.png differ diff --git a/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports VNC.png b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports VNC.png new file mode 100644 index 0000000..ff0097f Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/4 - Lab - Shodan2/Open Ports VNC.png differ diff --git a/ELE128 IoT Networking and Security/Labs/4 - ELE128 Lab 4 -Shodan 2.docx b/ELE128 IoT Networking and Security/Labs/4 - ELE128 Lab 4 -Shodan 2.docx new file mode 100644 index 0000000..187bf9b Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/4 - ELE128 Lab 4 -Shodan 2.docx differ diff --git a/ELE128 IoT Networking and Security/Labs/5 - ELE128 Lab 5 - Linux Network Commands.pdf b/ELE128 IoT Networking and Security/Labs/5 - ELE128 Lab 5 - Linux Network Commands.pdf new file mode 100644 index 0000000..ca45546 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/5 - ELE128 Lab 5 - Linux Network Commands.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/6 - ELE128 Lab 6 - Network Scanning - GUI and Command Line.pdf b/ELE128 IoT Networking and Security/Labs/6 - ELE128 Lab 6 - Network Scanning - GUI and Command Line.pdf new file mode 100644 index 0000000..8ee3467 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/6 - ELE128 Lab 6 - Network Scanning - GUI and Command Line.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard.pdf b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard.pdf new file mode 100644 index 0000000..bc54bc7 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/demo-feed1.py b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/demo-feed1.py new file mode 100644 index 0000000..ced4873 --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/demo-feed1.py @@ -0,0 +1,63 @@ +""" +This example writes data to a feed in a batch from a list. + +You can install the Adafruit library using the following command. +sudo pip3 install Adafruit_IO + +Before you run the program you must put in your username and key from +the Adafruit IO site. Copy from the website and replace my information. +My key will no longer work. It has been changed. + +To run the program from the command line use: +python3 demo-upload.py + +If you do not have Python you can install it from here: +https://www.python.org/ + +""" + +import time + + +# import Adafruit IO REST client. +from Adafruit_IO import Client, Feed + +# Set to your Adafruit IO key. +# Remember, your key is a secret, +# so make sure not to publish it when you publish this code! +#ADAFRUIT_IO_KEY = 'YOUR_AIO_KEY' + +# Set to your Adafruit IO username. +# (go to https://accounts.adafruit.com to find your username). +#ADAFRUIT_IO_USERNAME = 'YOUR_AIO_USERNAME' + +#################################### Replace these with your KEY. ########################## + +# These are no longer valid. Replace these values with your own username and key. +ADAFRUIT_IO_USERNAME = "csetuser" +ADAFRUIT_IO_KEY = "aio_pXkk38kXLMDZ" + +############################################################################################ + +# Create an instance of the REST client. +aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY) + +humidity_feed = aio.feeds('myhumidity') +temperature_feed = aio.feeds('mytemperature') + +temperatureList = [78.5, 77.2, 79.5,81.0, 82.4,80.3,79 ] +humidityList = [57, 55, 55, 54, 57, 56.8,56,56,55.6] + + +print("Sending Temperature") +for fahrenheit in temperatureList: + print(f"Sending {fahrenheit}") + aio.send(temperature_feed.key, str(fahrenheit)) + + + +print("Sending Humidity") +for humidity in humidityList: + print(f"Sending {humidity} ") + aio.send(humidity_feed.key, str(humidity)) + diff --git a/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/secrets.py b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/secrets.py new file mode 100644 index 0000000..01cf44d --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/7 - ELE128 Lab 7 Cloud Dashboard/secrets.py @@ -0,0 +1,12 @@ +# +# + +secrets = { + 'location': 'SpecifyALocation', # Just a label + 'ssid': 'putssidhere', + 'password': 'putpasswordhere', + "timezone": "America/New_York", # http://worldtimeapi.org/timezones +# "openweather_location": "New York City, US", + "aio_username": "csetuser", + "aio_key": "aio_xl6iR7P9M6jDnmt", +} diff --git a/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction.pdf b/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction.pdf new file mode 100644 index 0000000..81f1f52 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction/pico-lab-1.tar.gz b/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction/pico-lab-1.tar.gz new file mode 100644 index 0000000..28d3e9c Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/8 - ELE128 Lab 8 - Pico W Introduction/pico-lab-1.tar.gz differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard.pdf b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard.pdf new file mode 100644 index 0000000..029a783 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.51.23 AM.png b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.51.23 AM.png new file mode 100644 index 0000000..186d3ec Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.51.23 AM.png differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.56.15 AM.png b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.56.15 AM.png new file mode 100644 index 0000000..1fa4776 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screen Shot 2022-03-30 at 6.56.15 AM.png differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screenshot 2025-04-09 at 7.21.39 AM.png b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screenshot 2025-04-09 at 7.21.39 AM.png new file mode 100644 index 0000000..6fec65a Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/Screenshot 2025-04-09 at 7.21.39 AM.png differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/weather-prediction-upload.py b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/weather-prediction-upload.py new file mode 100755 index 0000000..6322e7f --- /dev/null +++ b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 11 Weather Dashboard/weather-prediction-upload.py @@ -0,0 +1,202 @@ +#!/usr/bin/python3 + +# Python program to find current weather details of any city +# using openweathermap api + +# import required modules for weather +import os +import requests, json +import urllib.request +import urllib.parse +from datetime import date,datetime +from datetime import time +import toml + +# print diagnostic values if True else skip if False +diagnosticFlag = True +#diagnosticFlag = False + + +# import Adafruit IO REST client. +from Adafruit_IO import Client, Feed + +settingsFile = 'settings.toml' +try: + with open(settingsFile, 'r') as f: + config = toml.load(f) +except: + print("File ", settingsFile," could not be opened.") + print("This file must be in the same directory as the main program.") + exit(-1) + + +###################### Replace these with your Open Weather KEY ########################## + +# This is the OpenWeather API key. +api_key = config['API_KEY'] + + +##################### Replace these with your Adafruit Feed KEY ########################## + +# These are no longer valid. Replace these values with your own username and key code. +ADAFRUIT_IO_USERNAME = config['ADAFRUIT_IO_USERNAME'] +ADAFRUIT_IO_KEY = config['ADAFRUIT_IO_KEY'] + + + + +########################################################################################## + + + +# base_url variable to store url +base_url = "http://api.openweathermap.org/data/2.5/weather?" + +# Give city name +location_name = "Zobo,Ma,Us" +locationList = location_name.split(",") +cityName,stateName,countryName = locationList + + +# complete_url variable to store +# complete url address +complete_url = base_url + "appid=" + api_key + "&q=" + location_name + +# get method of requests module +# return response object +response = requests.get(complete_url) + +# json method of response object +# convert json format data into +# python format data +x = response.json() + +if x["cod"] != 200: + print("Invalid return code") + print("x = ",x) + +# Now x contains list of nested dictionaries +# Check the value of "cod" key is equal to +# "404", means city is found otherwise, +# city is not found +if x["cod"] != "404": + + # Uncomment the next print line to show the weather in dictionary format + # print("x = ",x) + + coordinates = x["coord"] + latitude = coordinates["lat"] + longitude = coordinates["lon"] + + # Uncomment the next two lines to print the latitude and longitude + # print("coordinates = ",coordinates) + # print(latitude,longitude) + + # store the value of the "main" dictionary key in variable y + y = x["main"] + + # store the value corresponding to the "temp" key of y + current_temperature = y["temp"] + + # store the value corresponding to the "pressure" key of y + current_pressure = y["pressure"] + + # store the value corresponding to the "humidity" key of y + current_humidity = y["humidity"] + + # store the value of "weather" key in variable z + z = x["weather"] + + # store the value corresponding to the "description" key at the 0th index of z + weather_description = z[0]["description"] + + # print following values if True else skip if False + if(diagnosticFlag): + print(" Temperature (in kelvin unit) = " + + str(current_temperature) + + "\n atmospheric pressure (in hPa unit) = " + + str(current_pressure) + + "\n humidity (in percentage) = " + + str(current_humidity) + + "\n description = " + + str(weather_description)) + print("\n") + + fahrenheit = 9/5*(current_temperature-273) + 32 + pressure = current_pressure * .0145037738 + today = date.today() + current_time = time() + now = datetime.now() + t = now.strftime("%H:%M:%S") + sampleDate = f"{today.year:4d}-{today.month:02d}{today.day:02d}" + + # print following values if True else skip if False + if(diagnosticFlag): + print(f"{today.year:4d}-{today.month:02d}{today.day:02d} {t}") + print() + print(f"Predicted weather for {location_name} at {t} on {today.year:4d}-{today.month:02d}{today.day:02d}") + print(f"Temperature = {fahrenheit:.2f} F") + print(f"Pressure = {pressure:.2f} psi") + print(f"Humidity = {current_humidity:.0f}%") + + print(str(weather_description)) + +else: + print(" City Not Found ") + + +weatherRecord = { + "sampleDate": sampleDate, + "sampleTime": t, + "city": cityName, + "state": stateName, + "country": countryName, + "latitude": latitude, + "longitude": longitude, + "temperature": f"{fahrenheit:.2f}", + "temperatureUnits": "F", + "pressure" : f"{pressure:.2f}", + "pressureUnits": "psi", + "humidity" : current_humidity, + "description": weather_description +} + +# print following values if True else skip if False +if(diagnosticFlag): + print("\nweatherRecord") + print(weatherRecord) + + jsonWeather = json.dumps(weatherRecord,indent=4 ) + print("\njsonWeather") + print(jsonWeather) + +########################################################################################## + + + + +# Create an instance of the REST client. +aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY) + +#### Send data to the predicted outside feeds. + +if(diagnosticFlag): + print("Sending Temperature") + +temperature_feed = aio.feeds('outsidetemperature') +aio.send(temperature_feed.key, str(fahrenheit)) + +if(diagnosticFlag): + print("Sending Humidity") + +temperature_feed = aio.feeds('outsidehumidity') +aio.send(temperature_feed.key, str(current_humidity)) + +if(diagnosticFlag): + print("Sending Pressure") + +temperature_feed = aio.feeds('outsidepressure') +aio.send(temperature_feed.key, str(pressure)) + + + diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard.pdf b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard.pdf new file mode 100644 index 0000000..f4294c1 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard.pdf differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Lab12ServoCode.tar.gz b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Lab12ServoCode.tar.gz new file mode 100644 index 0000000..a780719 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Lab12ServoCode.tar.gz differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Servo wiring.jpg b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Servo wiring.jpg new file mode 100644 index 0000000..401e64c Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/Servo wiring.jpg differ diff --git a/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/dashboard.png b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/dashboard.png new file mode 100644 index 0000000..4590b96 Binary files /dev/null and b/ELE128 IoT Networking and Security/Labs/ELE128 Lab 12 Servo Position with Dashboard/dashboard.png differ diff --git a/ELE128 IoT Networking and Security/Syllabus_ELE-128-D01_D02_2025SP.pdf b/ELE128 IoT Networking and Security/Syllabus_ELE-128-D01_D02_2025SP.pdf new file mode 100644 index 0000000..e76fffc Binary files /dev/null and b/ELE128 IoT Networking and Security/Syllabus_ELE-128-D01_D02_2025SP.pdf differ diff --git a/ELE128 IoT Networking and Security/Syllabus_ELE-128L-All_Sections_2025SP.pdf b/ELE128 IoT Networking and Security/Syllabus_ELE-128L-All_Sections_2025SP.pdf new file mode 100644 index 0000000..1ac392e Binary files /dev/null and b/ELE128 IoT Networking and Security/Syllabus_ELE-128L-All_Sections_2025SP.pdf differ diff --git a/LabSchedule.md b/LabSchedule.md new file mode 100644 index 0000000..c71b26f --- /dev/null +++ b/LabSchedule.md @@ -0,0 +1,33 @@ +# MDC IoT Workshop 2025 Lab Schedule + + +September 5, 6, 7, 8 +5-6 hours a day 9 AM to 3 PM + +## Schedule: + +Day 1 - +Day 2 - Sparkfun SIK Kit/Arduino +Day 3 - Raspberry Pi Pico, Python, MQTT to Cloud +Day 4 - + +### Day 1 + + +### Day 2 +Overview of the Sparkfun Inventor's Kit (SIK) & Arduino +Breadboard circuits/Build to test +LED's, potentiometers (Pot), buttons, switch, RGB LED +Digital Output - LED +Analog input & A/D conversion + +### Day 3 +MicroPython & CircuitPython. +Raspberry Pi Pico +Temperature and humidity sensor +Cloud & IoT +Embedded Controller Platforms + +### Day 4 + + diff --git a/Suppliers/IoTPartsSuppliers.md b/Suppliers/IoTPartsSuppliers.md new file mode 100644 index 0000000..ce233a8 --- /dev/null +++ b/Suppliers/IoTPartsSuppliers.md @@ -0,0 +1,14 @@ +### IoT Parts Suppliers + +###Sparkfun +Supplier for the Sparkfun Inventor's Kit (SIK), Qwiic devices, and other IoT parts. + + + + ###Adafruit +Supplier for boards, displays, IoT parts, and the Adafruit Io IoT cloud. + + + + + \ No newline at end of file diff --git a/WorkshopSchedule.md b/WorkshopSchedule.md new file mode 100644 index 0000000..e78baf3 --- /dev/null +++ b/WorkshopSchedule.md @@ -0,0 +1,33 @@ +# MDC IoT Workshop 2025 Schedule + +September 5, 6, 7, 8 +5-6 hours a day 9 AM to 3 PM + +## Schedule: + +Day 1 - IoT Basics & Electronics Applications +Day 2 - IoT Networks & Security & Hardware Platforms +Day 3 - IoT Cloud Applications & Hardware Platforms +Day 4 - IoT Industrial Applications & Wireless + +### Day 1 +Intro to IoT & Cyber-Physical Systems +Applications/Operational Technology (OT) +Basic Electronic Control Systems + +### Day 2 +Basic Electrical/Electronics Theory +Microcontrollers +Networking & Security + +### Day 3 +Cloud & IoT +Embedded Controller Platforms + +### Day 4 +Wireless Networking +Industrial Networks +Automation/Robotics +Industrial IoT +Cisco Resources +