Editing UBISS2024
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This course is designed as a week-long tutorial to engage with ubiquitous devices in the domain of smart environments and how to use machine learning to build smart devices. Here, we use an [[Arduino_Nano_RP2040_Connect|Arduino Nano RP2040 Connect]]. | This course is designed as a week-long tutorial to engage with ubiquitous devices in the domain of smart environments and how to use machine learning to build smart devices. Here, we use an [[Arduino_Nano_RP2040_Connect|Arduino Nano RP2040 Connect]]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Schedule = | = Schedule = | ||
== Day 1 == | == Day 1 == | ||
− | * 16:00-17: | + | * 16:00-16:15 Lecture: Introduction |
− | * 17: | + | * 16:15-17:15 Lecture: Creating Interactive Smart Objects and Environments |
+ | * 17:15-17:45 Hands-On: [[UBISS2024#Task 1: Getting Started|Task 1: Getting Started]] Components, tools, and development environments | ||
* 17:45-18:00 Lecture: Preview of the Tasks Ahead | * 17:45-18:00 Lecture: Preview of the Tasks Ahead | ||
== Day 2 == | == Day 2 == | ||
− | * 10:00-10:45 Lecture: | + | * 10:00-10:45 Lecture: ML Development Cycle: data collection, data cleaning, and labeling, selection of the AI/ML approach, hyper-parameter * selection and implementing the model, training the model/system, deploying the model, operations, re-training/continuous improvement |
− | + | * 10:45-11:00 Lecture: Challenges of AI/ML on Edge Devices and IoT | |
* 11:00-12:00 Hands-On: [[UBISS2024#Task 2: Read Data|Task 2: Read Data]] (accelerometer and analog pin) | * 11:00-12:00 Hands-On: [[UBISS2024#Task 2: Read Data|Task 2: Read Data]] (accelerometer and analog pin) | ||
* 12:00-13:00 lunch break | * 12:00-13:00 lunch break | ||
− | * 13:00-14:00 Hands-On: Task 3: | + | * 13:00-14:00 Hands-On: Task 3: read data from the accelerometer for 4 different actions, store it, transfer to PC (Arduino IDE) |
* 14:00-14:30 Lecture: Rule-based Systems: how to design them, pros: explainability, cons: it is hard | * 14:00-14:30 Lecture: Rule-based Systems: how to design them, pros: explainability, cons: it is hard | ||
− | * 14:30-15: | + | * 14:30-15:30 Hands-On: Task 4: analyze the data in Excel/Google sheets and find rules for the 4 actions |
− | * 15:00- | + | * 15:30-16:00 Coffee break |
− | * | + | * 16:00-16:30 Demo session 1: present your solutions |
− | + | * 16:30-17:45 Hands-On: Task 5: Implement your rule-based algorithm, optional include explanations of why the state is recognized (Arduino IDE) | |
− | + | * 17:45-18:00 Hands-On: Presentations of selected results from Task 5 | |
− | |||
== Day 3 == | == Day 3 == | ||
− | * 10:00- | + | * 10:00-12:00 Lecture: Introduction to Jupyter Notebooks, training an ML model based on a given data and the self-recorded data set on the PC (* using Google Python Notebooks or personal installation) |
− | |||
− | * | ||
* 12:00-13:00 Lunch break | * 12:00-13:00 Lunch break | ||
− | * 13:00-15: | + | * 13:00-15:00 Hands-On: [[UBISS2024#Task 6: Getting Started with Jupyter Notebook|Task 6: Getting Started with Jupyter Notebook]] Installing Jupyter Notebook for Micropython, controlling LED, reading data, storing data |
+ | * 15:00-15:30 Hands-On: Project specification, Ideation on Project Ideas | ||
* 15:30-16:00 Coffee break | * 15:30-16:00 Coffee break | ||
− | * 16:00-16:30 Hands-On: Presentation | + | * 16:00-16:30 Hands-On: Presentation and discussion of project ideas, group forming (groups of 2 or 3) |
− | * 16: | + | * 16:30-17:00 Lecture: Introduction to ML Libraries (everywhereML) |
+ | * 17:00-18:00 Hands-On: [[UBISS2024#Task 7: Deploy Machine Learning Models|Task 7: Deploy Machine Learning Models]] Implementing a basic model using everywhereML | ||
== Day 4 == | == Day 4 == | ||
Line 53: | Line 39: | ||
* 15:00-15:30 Hands-On: stand-up meeting on project progress | * 15:00-15:30 Hands-On: stand-up meeting on project progress | ||
* 15:30-16:00 Coffee break | * 15:30-16:00 Coffee break | ||
− | * 16:00 | + | * 16:00-17:30 Hands-On: project work |
− | |||
* 17:30-18:00 Lecture: How to Evaluate ML Solutions (talk and discussion) | * 17:30-18:00 Lecture: How to Evaluate ML Solutions (talk and discussion) | ||
== Day 5 == | == Day 5 == | ||
* 10:00-10:30 Hands-On: stand-up meeting — project challenges and solutions | * 10:00-10:30 Hands-On: stand-up meeting — project challenges and solutions | ||
− | * 10:30-11:30 Hands-On: project work | + | * 10:30-11:30 Hands-On: project work |
− | |||
− | |||
* 11:30-12:00 Lecture: Pitfalls and Challenges in Developing ML/AI for IoT | * 11:30-12:00 Lecture: Pitfalls and Challenges in Developing ML/AI for IoT | ||
* 12:00-13:00 Lunch break | * 12:00-13:00 Lunch break | ||
Line 72: | Line 55: | ||
== Day 6 == | == Day 6 == | ||
* 13:15-18:15: Workshop Result Presentations | * 13:15-18:15: Workshop Result Presentations | ||
− | * 18:30-18:50: Debriefing | + | * 18:30-18:50: Debriefing in workshops |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Tasks = | = Tasks = | ||
== Task 1: Getting Started == | == Task 1: Getting Started == | ||
− | + | Connect an Arduino Nano RP2040 Connect board | |
− | + | * Install the basic software https://labs.arduino.cc/en/labs/micropython | |
− | * Install the | + | * connect the board via USB |
* Task 1.1: Make the orange LED (pin 6) blink using micro python https://docs.arduino.cc/micropython/basics/digital-analog-pins/ | * Task 1.1: Make the orange LED (pin 6) blink using micro python https://docs.arduino.cc/micropython/basics/digital-analog-pins/ | ||
− | * Task 1.2: Connect an external RGB LED (pin | + | * Task 1.2: Connect an external RGB LED (pin 2, 3, 4) and control it (on, off, mix color, brightness), https://www.sketching-with-hardware.org/wiki/RGB_LED |
− | |||
− | |||
=== Solution Task 1.1: LED Blinking === | === Solution Task 1.1: LED Blinking === | ||
Line 130: | Line 91: | ||
from machine import Pin | from machine import Pin | ||
− | # RGB LED connected to | + | # RGB LED connected to Nano WiFi module. |
− | ledG = Pin( | + | ledG = Pin(2, Pin.OUT) |
− | ledR = Pin( | + | ledR = Pin(3, Pin.OUT) |
− | ledB = Pin( | + | ledB = Pin(4, Pin.OUT) |
print("start") | print("start") | ||
Line 150: | Line 111: | ||
ledB.on() | ledB.on() | ||
time.sleep_ms(250) | time.sleep_ms(250) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Task 2: Read Data == | == Task 2: Read Data == | ||
* read data from the accelerometer and the gyro and print them (Arduino IDE) https://docs.arduino.cc/micropython/basics/board-examples/ | * read data from the accelerometer and the gyro and print them (Arduino IDE) https://docs.arduino.cc/micropython/basics/board-examples/ | ||
− | * extend | + | * extend you program to write the data from the accelerometers to a file, https://www.sketching-with-hardware.org/wiki/FileIO |
* transfer the file to your computer | * transfer the file to your computer | ||
− | * optional: add the photo resistors to your board, read their values, and write them to the file | + | * optional: add the photo resistors to your board, read their values, and write them to the file, too, https://www.sketching-with-hardware.org/wiki/LDR |
=== Solution Task 2.1: Read Accelerometer and Gyro === | === Solution Task 2.1: Read Accelerometer and Gyro === | ||
Line 209: | Line 135: | ||
time.sleep_ms(100) | time.sleep_ms(100) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
=== Solution Task 2.2: Read analog values === | === Solution Task 2.2: Read analog values === | ||
Line 214: | Line 141: | ||
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
+ | #Example usage for Arduino Nano | ||
from machine import Pin, ADC | from machine import Pin, ADC | ||
from time import sleep | from time import sleep | ||
Line 226: | Line 154: | ||
== Task 6: Getting Started with Jupyter Notebook == | == Task 6: Getting Started with Jupyter Notebook == | ||
− | * | + | * connect the board |
− | * | + | * install the Juypter Notebook, https://www.sketching-with-hardware.org/wiki/Jupyter |
− | * | + | * read the accelerometer and the gyro and show it in the notebook |
+ | |||
=== Task 6.1: is it moved? === | === Task 6.1: is it moved? === | ||
Line 245: | Line 174: | ||
== Task 7: Deploy Machine Learning Models == | == Task 7: Deploy Machine Learning Models == | ||
We will use https://github.com/eloquentarduino/everywhereml to detect the same gestures as in Task 2.2. For this, install everywhereml: | We will use https://github.com/eloquentarduino/everywhereml to detect the same gestures as in Task 2.2. For this, install everywhereml: | ||
− | |||
− | |||
− | |||
<syntaxhighlight lang="Bash"> | <syntaxhighlight lang="Bash"> | ||
− | pip3 install -U | + | pip3 install -U everywhere |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 268: | Line 194: | ||
== Task 8: Connect to WiFi == | == Task 8: Connect to WiFi == | ||
This is an optional task. | This is an optional task. | ||
− | * | + | * connect both boards to WIFI using [[Tutorial_Network]] |
− | * | + | * use the Arduino Nano RP2040 Connect as output (showing a color) |
− | * | + | * use the Arduino Nano RP2040 Connect as input (recognize with rules 3 gestures) |
= Links = | = Links = | ||
Line 321: | Line 247: | ||
C:\Users\ru42qak\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyterlab>python -m notebook | C:\Users\ru42qak\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jupyterlab>python -m notebook | ||
− | [[Category: | + | [[Category:Course]] |
[[Category:UBISS2024]] | [[Category:UBISS2024]] | ||
[[Category:Arduino Nano RP2040 Connect]] | [[Category:Arduino Nano RP2040 Connect]] | ||
− |