This is an interactive installation base on what I learned at the Connected Devices class. It can use the reversible checkboard to simulate the disease spreading base on the humidity, air quality, crowd density, etc around in the area.

Instruction

An SIR model is an epidemiological model that computes the theoretical number of people infected with a contagious illness in a closed population over time.

 

SIR Model -- from Wolfram MathWorld

My goal is to show the viewers what we can even a tiny little change can make a great difference to stop the disease.

IdeaItion

Technical Solution

​in this part, I am going to give a full account of how to make it happen. The followings are base on what I learned at the

 

 

class. 

Connected Devices

- IoT has always been my favorite.

Updated on Mar 9th

week 6 assignment: 

Web-connected Environmental Monitor

Takeaways:

  • The Pi zero actually have 2 mini-B ports, one is only for POWER.

  • We cannot use the latest nodejs, it does not work with many of the modules we need.

  • Reboot solve half of the problems.

  • Remember to register the board into the sandbox.

  • Things will definitely go wrong if you do not understand what you are doing.

The MCP3008 is for converting the analog signal into digital, which is the only way the Pi can read.

The temperature sensor is for getting the read from the environment. 

I use the circuit but I failed to get the reading. So I decided to start from an easy version. I got rid of the potentiometer, the sensor, the ADC.

The push-button sends out digital signals. By running these codes, it works. To make it clear, so far everything is still local. Now I need to make it connect to the server. 

I need to ask for a session key for the connection. 

Here is the final code.

The led seems not working...........

​Cron Job

The syntax we use to set up the interval between each request. The quick and simple editor for cron schedule expressions: Link

Fetch back

Credits to Github repo. 

Form encoded

$ curl -X GET -d macAddress=AA:BB:CC:DD:EE:FF -d sessionKey=12345678 http://localhost:8081/data

Query parameters. Note that & must be escaped with a backslash when using curl.

 

$curl -X http://localhost:8081/data?macAddress=AA:BB:CC:DD:EE:FF\&sessionKey=12345678

 

unauthorized

Other useful links

https://tigoe.github.io/PiRecipes/

Updated on Mar 3rd

week 5 assignment:

Setup a raspberry pi

USB-to-serial connection to a Raspberry Pi. I/O pin connections for the Raspberry Pi

First I tried to use a 3B+ model. It does not work well. I think there must be something wrong with my board. So I change to a Zero. It still does not work quite well.

Zero with a adapter

3b+ with a fan

Updated on Feb 16th

week 3 assignment:

Philips Hue Control from Arduino

democracy

Overview

I am using 5 potentiometers to control the different properties of the bulb.

Each potentiometer stands for one side of the power.

We need 5 individuals to work together to make their blub the looks they want. The 5 of them seem like sharing power together. 

But actually, the one who controls the brightness can turn the light off if she is not satisfied with the others' decision. That's why it called Democracy.

Process

Physical interface

Coding

I borrowed heavily from the WiFi Nina example code. The full source code for this controller is available here.

1. Signal of connection

2. Analog read input from the potentiometers.

3. Analog write output to the bulb.

A few key questions I met during the building:

1. Using wifiNINA instead of wifi101 Library Wifi101 is not an adaptation to the Nano33 we are using right now(not sure). During this progress, I learned what is the secreted ssid, and how to register my device into the sandbox. Besides, I learned to use the serial monitor to check in which step I met an error. 

2. My code stops update after a few rounds. 

Updated on Feb 23th

Things I managed to fix this week:

1. The hole on the side is too big for the potentiometer. It is better to make sure of the size than do the laser cut. Now there are still some problems left. Because I can not make my Arduino battery cable through that small hole.

 

2. Get rid of the noise. Using a series of code to remove the noise when using potentiometers.

 

3. Combine 3 requests into one. Only send request once including all the changes I would like to make. This helped me to speed up my interaction for 500ms. 

The video shows that the headquarter now can use 3 potentiometers to control 3 attributes(brightness, saturation, hue) of the bulb.

Coding

Current code link.

Thanks to my instructor Thomes Igoe, Atchareeya (Name) Jattuporn, Cy Kim, Sam Krystal, Alvaro Lacoutre, Tirta W. Rachman, Jason Tse, Jingyi Zhou, Tianjun Wang

© 2020 by that's fine thx.com