This is a continuation of my previous blog post.
Connected Devices
AirNow API
AirNow is the US Environmental Protection Agency’s site for reporting air quality. The API makes air quality data from all over the country available by http request. Specifically, I am interested in the Air Quality Index (AQI) which reports on levels of ozone, particle pollution, and other common air pollutants.
I created an account to get an API key. Looking at the AirNow web services, you can get air quality data by zip code, but there’s a difference between a “forecast” and the “current observations” request. Here’s what a test request and response looks like using the API’s query tool:
Getting AQI with Arduino
I started with this Arduino code from Tom. I am in luck because I’m using the exact same API as the example, almost like I planned for that… ?! But jokes on me, I cannot get the sketch to work. With a few debug statements, I can see that I’m not passing the http.connected() condition. Also, it takes a really long time to get past the “http.get(route)” and “http.skipResponseHeaders()” lines.
Historically, I’ve never been able to get an SSL connection to work (idk why) so I switched the code around to http calls (not sure if I CAN do this with the AirNow API, but worth a try). That also never passes the http.connected() function.
When I “curl www.airnowapi.org/aq/observation/zipCode/current/?format=text/csv&zipCode=85215&distance=25&API_KEY=800547F9-0F0F-433E-BC00-6454026B35C8” in my computer’s terminal window this is what I get back:
I don’t really understand this response. I thought this kind of request would be a “get” and I was kind of expecting an API response back like I saw in the AirNow query tool.
Soft Robotics
I want the lungs of my sculpture to be paper bags. I’m starting to build out this project with the Programmable Air designed by Amitabh. Here are some of its specs:
Has 2 pumps and 3 valves
Can suck, blow, and vent air
Can achieve -0.5 to 0.5 atmospheres of pressure
When working with the Programmable Air, don’t forget to plug in a 12V power supply into the barrel jack like I did because things will not work. Also, when uploading code to its Arduino Nano be sure to choose “ATMega328P (Old Bootloader)” for the processor in the Arduino IDE. I started with the “factoryFirmware” example sketch from the PA library which lets you suck and blow air using the onboard buttons. This sketch will be a good way for me to test my paper air bags.
I really like the aesthetic and context of sack lunch bags, so that’s what I’d like to use for my sculpture. Below you can see the different sizes I was working with. I hooked these up to the PA and tested suck and blow.
I have some video documentation of my results, as you can see, it doesn’t really look like breathing lungs. The videos are 2x speed and the inflation/deflation was slow and subtle. The small air bag didn’t work at all, I’m thinking I must have a leak in my bags. I was also having issues with the zip ties not working and it did cross my mind that I could be tightening the zip ties too much and constricting the air flow completely.
The last thing I wanted to try out were the two “lungs”. Luckily we got this tee coupler thing from Amitabh’s lecture day which really comes in handy when you want to blow up two things at once. I didn’t need to take any video documentation of this setup because the air bags didn’t seem to change shape at all.
To get a better flow rate I could try Amitabh’s coke bottle method where a pump is constantly filling a bottle with air and a valve controls the flow to the rest of the system. I’m also thinking the volume and/or the material of the bags could be an issue but I am not sure where to begin with debugging.
Felting - First Attempt!
I watched a lot of felting tutorials this week and it really just seemed like all it is is stabbing wool with a special needle… and it is! Here’s my first try at forming some simple shapes.
To see the next blog post about this project click here.
References
Connected Devices
https://linuxize.com/post/curl-rest-api/
https://github.com/amcewen/HttpClient
Programmable Air
https://github.com/Programmable-Air/Code
https://github.com/Programmable-Air/PCB
Felting
https://www.youtube.com/watch?v=PnkVLApVejc
https://www.youtube.com/watch?v=NEjy4q1QwoM
https://www.youtube.com/watch?v=utQouNW1O6M