This week, I explored MKR 1000.
I was reading Tim’s blog, and he mentioned about the firmware. I used code from this page here to check whether the firmware on my MKR 1000 is matched with my WiFi 101 library. It was not the right version. So, I downgraded the firmware version to 19.5.4 as suggested in the serial monitor. I was using code from the firmware updater tutorial here.
I was not sure how to post another string onto Dweet. This is something I tried but not worked. My goal was to create a if statement like:
if the sensorValue > 500
“a cat stepped on my computer.”
if the sensorValue > 300 & <500
“a small cat stepped on my computer.”
“no cat at the momenet”
This week, I made an interface to control Philips Hue. With Anna, Vince, and Sid, we studied together on Saturday afternoon and figured this out.
These are the steps I did:
connect hardware, hub (power + ethernet), bloom (power)
finding IP address (on the hub, the IP address looks like 220.127.116.11, but it is 151)
use Philip’s developer interface, registered a username
copy and paste Tom’s client-control.js to my own file
added alert effect
did a little design for the interface
Other things I learned:
According to Vince, it was better to clone the whole repository because other files may be needed to run client-control.js. I also watched Shiffman’s video (p5 workflow) about install p5 package on my project, so I could use p5 in my visual studio code. I also learned some very basic front-end (html and css) from Vince. Now I have a slightly better understanding about the bigger picture of back-end and front-end.
After class, I had an interesting conversation with my classmate Vince, because I was so confused about this deep question Tom asked me: what is a web server?
Me: If websites are like socks, is the server like a drawer with socks?
Vince: Nope. Server is like a socks manager. It finds the socks for you and give it to you.
Me: Then, what is the drawer doing?
Vince: The drawer is more like a database.
While I was so lost in this week’s assignment, I found these tutorials (8.1-8.4 Intro to node.js, Express, Route, More Route) by Dan Shiffman very helpful. These video covers what a web server is, what it does, what package is, how to use node and express to make a web server, what route is, how to program a route.
After watching Shiffman’s tutorial, I had a better understanding of how things worked on the web server we made in class. Then, I decided to create a web server that uses cat language to communicate. This idea is inspired by how server and client communicates. Based on what I understood, when we request something from the server, we are communicating in HTTP. It felt like they are talking in secret language. So, in this web server I made, client and server are talking in cat language.