Using a MKR to talk to the web

In preparation for the big assignment of Connected devices, I decided to follow through Project 6 explained in Chapter 4 of "Making things talk"

Following on the exercise was extremely easy and straightforward,  the only issue is: getting the MKR1000 to work, the challenge being posed when using in Windows, but nothing that a little bit of patience didn´t solve. I discovered that the best answer on how to install the driver is found here: https://www.arduino.cc/en/Guide/MKR1000 , and when I was not able to make it properly connect I went ahead and executed what appears to be a magic trick for the MKR: double-click the reset button. Also, I tried on an iOS while in a network that required for my device to be registered, after registering I was good to go.

sensorsServer.gif

The first part of printing information from the sensors worked perfectly, but as you can see in the next image I am not being able to change the website's color, I am sure it is just of a problem of properly writting the html. Lets hope I can fix that before class

MKRServer_colors.png

UPDATE: CODE WORKS, PAGE LOOKS GREAT!

The code for this is found in this repository

Learning Spanish with the "Jiu"

Now that we've learnt how to create servers and talk to them we are using this basis knowledge to talk to smart home devices such as the Philips Hue, and the WeMo.

Since it looked that it was way more documented I decided to work with the Philips Hue. Which is incredibly easy to use, specially if you have the IP address of your bridge (which I did because I was working with the ER's device).

In order to start smoothly and orderly I went through the Getting Started guide provided by Phillips Hue's Developer site.

It was incredibly easy to get it working and start to grasp how to create an app to control the device.

Again I went in a quest through the open wide web for examples and tutorials, and after trying many I found that the simplest one helped the concepts land in my head. Click here for a link to the Github repo I refered to.

Now that I was able to talk to the lamp I wanted to be able to control it with a p5 sketch, namely the one I made for the homepage of this website. My plan: as you dragg your mouse around the screen the lamp changes color.

Yet my mind was having a really hard time trying to figure out how this may happen. I now I looked into the ITP human web for help, it was Grau Puche with whom I worked in web apps before who came to the rescue. And he showed me how to use socket.io, which he explained is not the optimal tool to do what I wanted to do, but it helped me understand how I would use the way of talking to the bridge/light from Peter Murray's examples to create my own webpage which could control the light.

To finalize the concept. Since Grau and I speak spanish  and we tend to call our variables with spanish name, I decided to make a website in which you could learn the colors in spanish through colors. 

Click here to go to the repo where the bones of this project live.

Understanding servers

Or trying to anyway.

For connected device's first asigment we had to set up a simple server with a restful API and make do a GET and POST function.

This may seem pretty easy to anyone who actually understands servers. But for someone like me who is still trying to wrap her head around the whole network thing, some reiteration was required.

So after looking at a whole lot of examples and tutorials I landed on the following youtube video which is meant to guide you through making a form type of website which will get information input by users and add it to a database

There were several things I couldn't quite understand in the way so the time figuring them out took from my developing time.

Here is a list of my learnings:

  • I understood what dependecies are and how to install them through the json file created by npm
  • Kinda got middleware and how that is where things happen
  • Installed nodemon which is awesome to make testing more efficient
  • Used EJS still don´t know what it will be good for, it is working for the form I guess
  • Was hoping to use the express validator as a way of iterating through possible answers but that is not how it works
  • When I tried to reload my app it was not loading, because it was sending the info forever again (Then I discovered that I was aming at the add user url so of course it did not worked)
  • Yet when I went to the home it worked but then every time I was sending the new parameters it froze
  • Then he did a MongoDB data base but that is not of my interest now

Click here to go to the github repo where the three versions of this homework live

Molds for the soldered board

After I tested the board as a wireless stand alone I decided that an enclosure was in order.

animatedBoards.gif

This meant joining the knowledge of Prototyping Electronic Devices and Digital Fabrication classes in making the board and then designing the enclosure.

The design process started off with the following models:

These I consulted with Danny Rozin who suggested that I tried a dip casting (how rubber gloves are made), for this I created the following models

These dip molds were made at La Guardia studio. Since the date of delivery was going to take a while I decided to start working in another mold.

With the help of Chester Dols I created these models which will make up the spheric enclosure I´ve been dreaming of for so long.

The molds are comprised of 4 parts to do the casting and one part to hold the circuit.

 

This is the central part that will keep the casted mold hollow.

This is the bottom piece which has standing legs that will helo the casting

This top mold was divided in to so that placing the interior hollow mold would be possible.

All parts of the mold had long tabs made to allow for clamping. And the bulb mold had resporatory and casting holes which proved actually too narrow to use, it was actually this part what proved more need of adjusment but lets not jump ahead in the process.

The base and bulb molds were made in the Ultimaker 3 with a 6mm nozzel and PLA filament. It took for the machine an average of 25 hours to create each part. The two parts that comprise the top mold were made in a Fortus 450mc at Tandon´s makespace. The average cost of the outsourced jobs (drip molds and top mold) was of $20 USD due to the subsidy provided both by Tisch and Tandon.

animatedSphereMold.gif

For the material I used Ecoflex 00-50 sylicone bought in the Complete Sculpture.

The casting process for the dripping molds was not successfull as the layer poured was too thin, so if I am to try this process again I would need a hardener for the ecoflex so that it cures faster and I can drip mor layers on top.

WP_20171214_00_25_34_Pro.jpg

The casting for the sphere mold, as I mentioned before was a little hard due to the pouring hole being too smal, it took some work to

It took 24 hours for the material to cure completly and the realese was extremly easy. Once it was done I installed the conict enclosure with the pressure sensor attached to a baterry holder inside the sphere I had to hold it with electrical tape to make sure it didn´t move but in general terms it was tightly sealed and the pressure sensing worked perfectly.

To further develop this prototype the bulb mold will be need to be improved so that casting is easier, the circuit enclosure holds to the sphere in a better way and I also need to create a lid to seal the enclosure part.

Manipulating reality

For my final Narrative in AR project I decided to play around with the idea of Manipulating Reality.

I formed my project around two main ideas

  1. If with AR tools we are able to "place" in the real world virtual objects and universes, what would happen if we could use haptic controls to manipulate/touch the reality we see
  2. A constant question during this course for me was how to justify the need to hold a screen in front of me in order to get the experience I desire. That is how I ended up thinking that if the haptic controls I was thinking of were attached to a screen then it would be like holding a "magical" looking glass.

So i went back to my previous work regarding tangability and "squishy buttons" which I have been developing further in other classes during this semester. During this exploration I´ve discovered that the tangability of an object that can be squished is highly satisfactory for people.

I decided to use the sensor I´ve been using for said "squishy button" and make an AR experience that would make a yuxtaposition of senses: sound, touch and sight.

For this I used Vuforia as I knew my experience was going to be static, not mobile due to the time I had to develop the piece. So with the vuforia camera I created a grid of reality that could tbe ransformed, for this transformation I thought of the idea of using a reflected image.

The idea of the reflected image came from the exploration of the obiqutous screen, a screen that is in many ways also a mirror - due to its front camera capability-. What if we could touch said mirror and change the way it shows reality back.

So through connecting a sensor that would detect the pressure excerted over a lump of putty in a jar read by an Arduino UNO communicating with Vuforia using Ardunity for Unity, I created an experience that lets you manipulate the reflection of the reality you are in. Then not only Augmenting reality but also augmenting your control of it.

Further developments of this piece will involve making it wireless and portable i.e. being able to move both control and app into a mobile device, probably an iPad.

Lingering Memories

Memories live in a form that seems graspable. Like you can go to them and explore them, but you need an entry point, a guide. And even then when you try to access they just seem to go away.

This made me feel of flying insects, like butterflies. Which brought...memories back. Memories of my trip to Costa Rica.

Hence I made a Blue Morpho the main character of my app.

I clearly remember Morphos apearing and disapearing in the walks I took through Costa Rica's forests.

So I created a scene in which a Morpho will signal the place where the memories could be found, but these will not be easily accesible, they are scattered around and seem to scape as you come closer to them, until you can finally reach and then you can see them from every angle, and to find the other memories? Just look for the guide and you will be pointed to them Memories live in a form that seems graspable. Like you can go to them and explore them, but you need an entry point, a guide. And even then when you try to access they just seem to go away.

This made me feel of flying insects, like butterflies. Which brought...memories back. Memories of my trip to Costa Rica.

Hence I made a Blue Morpho the main character of my app.

I clearly remember Morphos apearing and disapearing in the walks I took through Costa Rica's forests.

So I created a scene in which a Morpho will signal the place where the memories could be found, but these will not be easily accesible, they are scattered around and seem to scape as you come closer to them, until you can finally reach and then you can see them from every angle, and to find the other memories? Just look for the guide and you will be pointed to them

First Try: The hand soildered board

My two main goals with this part of the process were 

  1. Making the button a stand alone object
  2. Being able to release the model so other can use the basic structure of it, specially into the Sensor Library

With this in mind I started this project by transferring the code into an ATTINY85 and selecting the output to be a LED.

To install the code into the ATTINY85 I used an Arduino Uno as the loader. The process of doing this is pretty straight forward, both with regards to the code and the circuit setup. Since this code is very simple it doesn't need much tryout but if it needed to be revised (which I did only because I worked with a flawed ATTINY for about an hour) its better to have two boards, one that will test the sketch and another one that will load the code into the ATTINY.

Once the ATTINY85 was ready I set it up on a Breadboard for tryout with two 3V batteries.

At this point I realized there were two main components I needed to pay attention to in this prototype: the battery package and a switch.

As the enclosure I designed a holder to be laser cut and placed with standoffs above the board. This design includes a switch and the breadboard design considers a battery package for two 3V cell batteries. Due to time constrains and the battery packages I tried being horribly faulty I ended up creating my own "package" for the batteries, so this is something that still needs to be figured out so that it is included in the BOM.

Part of the idea of this board was that it could be placed into a ballon, closed in there and then just squish the ballon to get the signal. But this was not happening, because the sensor checks for pressure diference and by being withing the fluid it cannot register a change in the pressure since it is only displacing withing its atmosphere

So to hold the "guts" of the button I laser cutted a paper dodecahedron. This is not the best solution as the switch gets trapped inside of it. So if the button will be used in this application the board and the enclosure need to be design with the light diffuser.

Moving forward with this project this is the checklist:

  • Imagine other applications for this prototype other than a very weird flashlight
  • Create a board in which the output of the sensor can be changed
  • Also the communication of the sensor can be augmented, through giving the board a way of having a wifi/bluetooth integration, as well as communicating with another microcontroller or having a Serial communication port.
  • Have a 3D library of the components so new enclosures can be designed for different applications
  • Solving how power should be provided for the different communication solutions (wifi, serial, bluetooth)

In order to replicate this prototype the BOM would be:

  • Enema Bulb
  • MPX5010 case 867B-04
  • ATTINY85
  • 220 resistor
  • White LED
  • 2 3V cell batteries
  • Acrylic (or other material for enclosure) and standoffs

The schematics and code live here:

https://github.com/RSofiaC/pressureControl/tree/master/ATTINY85

Let's do this once more

For my "Do it once, do it again" project I want to dive deeper into a project I started working last semester: My squishy buttons

This project started from the idea of using the tangibility of a squeeze to activate a reaction. And what started as a LED in a balloon:

And for a Unity game inside a escape room experience.

 

All of these have been iterations on the same kind of sensor attached to the micro-controller in the same way: As an analog read getting a map of values that is then printed into the output.

This time around I would like to:

  • Explore wider capabilities of the sensor  (I'm just using three out of its six pins)
  • "De-attach" the sensor from the micro-controller
  • If possible place the sensor within the squish device.

I know there are similar products to this idea in the market, but what I'm trying to do is a pressure sensitive button not a ball that lights up.

Sustraction - The final

The start of the process that lead to this final was covered in my last skill builder post .

I am chasing the dream of building an "acordeon lamp". which has placed me in the big challenge of sculpting abstract figures and translating them into the real world.

This handicap of mine of being unable to imagine what I can't touch and see in the real world has meant that I have made various prototypes, and it seems like I will continue on this road until I figure out scale and functionality of my final project

Before I moved into the new shape (last in the row above) I had to actually do some hand wood work to open the slot for the arms because I really needed to see the way the whole arrangement looked together, since trying it out just with the cardboard arms was not giving me the feel of my piece.

Once I had the idea of the whole piece I went ahead and design what would be the shape of my final piece.

Yet I tried it towards the main part of the lamp and in scale it does not look proper. This means that now I need to divide my process in two: 

A) Re-design the dimensions of the main piece and the arms to fit the scale of the bulb

B) Re-imagine the production process and materials so I can get it right from a bigger piece.

 

This is subtraction final but not the final step in this project.

Last Skill Builder - The 4 Axis Mill with an interesting shape

So this happened in class and YES I got hooked too. And YES I wanted to play with it but. no, my project didn´t allow for it.

Since time constrains made me start working on my final project I had to use vector works to start prototyping my main piece for my final, which is hopefully going to be a telescopic desk lamp.

Samuel Chan lamps

Samuel Chan lamps

Aspiring to do this like almost any other project has proven to be INCREDIBLY hard. So from prototyping the first cardboard model all the way into designing the vector works and finally cutting the first model I have been redesigning the lamp.

After I had the proof of concept on cardboard I went ahead and designed the main part. It was around 4 hours of pulling and pushing shapes on vector works. Trying to find the way of making them allign perfectly, how to cut them, measure them in real life and then translate them into the 3D model. As you can see (from the struggle shown in this following video) dealing with Vector Works was an interesting challenge

After struggling so much with Vector Works getting it into the CAM was quite a breeze, specially since I was cutting a cylinder in round stock I didn´t even needed to think about tabs.

And then the beautiful moment of seeing the machine do its zen cutting for what seemed pretty rational of a time (30min):

Yet 4 hours of design and 30 minutes of cutting later

It did NOT came out as planned, the holes did not went through even though it showed it in the machine. So I had to add 2 extra hours of hand woodworking so I could prototype the acordeon with cardboard

So now it is off to re-designing the cylinder so it can fit the laser cut arms:

My new found love: 4 axis mill

This is such a beautiful machine to make beautiful organic wood shapes. My only issues is that I am yet to know how to properly design those shapes.

Once the design is done setting it up is EXTREMLY easy, even though I hessitated a little bit when it cam e to setting the 0s, in general terms it is pretty straight forward how to set it up, and I thinl that it has to do with the fact that the Roland Viewer is an extremely well design program that really walks the user through setting up the material in the perfect way and making sure the design is properly milled.

My shape is nothing really but a try on the machine's capabilities. My biggesti interest was seing how it managed circular forms...it is fantastic

Setting up I learnt a couple of things:

  • Always re-inserting the bit
  • Not tighting my material too much in order to prevent vibration
  • Making sure the tighting nut is reachable and not underneath over the bed. I do this by turning A

My piece took a while longer that what I would've expected (It's roughly a 2 by 2 piece) but that has to do with the fact that I was working with hard wood (no idea what exactly though since it came from a salvaged piece) and that the machine is really detailed when doing the job.

Wheb it comes to the process there is nothing to report because it went smoothly through it. I do have a to-do list of things to learn

  • 3D modeling of course.
  • Now that I did my first 4 axis piece I have a better idea of how to translate what I see on the screen into real object.
  • Experiment with more hard woods as they have really awesome capabilities on this machine.

If you are making it bad, make it REALLY bad. Angsty poems n' stuff

Don't get me wrong, I LOVE Python. I just feel Python doesn't love me...not for the last few weeks anyway.

But since I am not willing to keep on missing another homework I decided I was going to tackle this task FULL FORCE. I cannot do beautiful code, or beautiful compositions. So I'm going to do decent code and really bad, terrible compositions. 

My main inspiration for this task: Mr Ricardo Arjona

arjona.gif

This is a very latin american reference...but he is, say not the best song writer in Spanish language. He is famous for writing with antonyms, synonyms and angsty sentences, and then sing his compositions with a sad tone in an attempt of making his songs sound deep and meaningful. So I did exactly that. All the code I use can be found in my repository.

But since these are english compositions I guess the output is more of a Cher Horowitz lyrical writting

As I have pointed out before python and myself haven't been in the best terms latetly so if it wasn't for the restaurants.py example in the class notes I could've never made tryagain.py which is my main code. Like the example code where it comes from it joins together randomly chosen words from a list of antonyms and synonyms to "quit", synonyms to "understand"  and a list of some angsty teen sentences. In there is a function that capitalizes the first letter of the selection, and another function to join them all together.

This is my favorite of all the profound teen poems I got:

Making toys...foosball toys

Eventhough my big goal at the lathe is to someday make a mexican cocoa shaker, this week I had to create a foosball character. Since I am training myself on the arts of the free circles I wanted h@m to have free circles on h@z body...sadly that was not possible, the reasons are various. 

First things first. The material I chose was a ply like log made out of MDF panels. I really wished I had thought of taking the picture of the scraped piece I worked with because the transformation is quite amazing. But I didn't so just imagine a recepie holder made out of MDF sheets

Well I took it apart, glued the panels together, waited 24hrs, cuted out the excess, sandded down the corners to make it smoother and finally got to work on it

Getting to my final product was a veeeery long process, I would say it took me around 48hrs to get to it. Plus it was also very tiering, but also very educational. These are the lessons learnt:

  1. Patience and constance is the answer to successful subtraction: I have sculpted on ceramics before, and I thought that that process needs a lot of patience because of the delicacy of the material. Actually EVERY subtraction project on any sort of tools needs patiences. Carving the material to show the shape it hides takes time, lots of it.
  2. PlyMDF is not the best ally for lathe sculpting: even though it turned into a very easy material once I got the dowel finely rounded, getting there was very hard because I had to fight with lots and lots of layers of material, and of course the glue layers I gate it myself.
  3. Again PlyMDF is not the best ally for lathe sculpting: holding the piece was VERY hard, the drive center kept on carving a little "pool" where it was supposed to be holding the material because of its softness, so I during the dowel turning and the final piece turning I had to change my piece's position once (interchange the spindle for the live center)
WP_20170324_22_09_19_Pro.jpg

 

  1. In case you were wondering - PlyMDF is NOT the best ally for lathe sculpting: my piece ended up breaking when I was almost done, I was going for the last try on the loose ring and I guess I placed so much pressure on the ring I was trying to get loose that the head of my character broke (visible in the picture) and it went flying on the air...some wood glue fixed the problem.
  2. I am not good (enough) at math: eventhough Rita and Nate let me use their jig, my holes are still note 90 degrees apart from each other...

Stay tuned for game day: 28/5/17 9am EST

Winter is killing me, tropical weather deserves a song

The countries with the best weather in the world share a lot of things, like people with good mood, paradise worth calling spaces, but above all...cacao and coffee gets produced in their land. Specially due to coffee production these countries have come to be known as The Bean Belt countries. Among them, my beloved Mexico

Image by Candy Niemeyer

Image by Candy Niemeyer

All of these countries share also the characteristic of having within their territory some sort of Tropical Weather, or being "Tropical Countries".

I miss the tropics so much these wintery days that I decided to try and compose a song for them. All of the files I used for this can be found in my repository.

My three inputs were the lyrics to a beautiful Brazilian song "Pais Tropical", the list of countries that comprise "The Bean Belt" and an explanation of the Tropical Biome

background by freepik.com

background by freepik.com

The most laborious part to complete the process was to remove the numbers from the country list. Since I wanted to do everything just through python programs I had to make and test noNumbers.py several times. Once I had that done I ran wordchange.py which worked on the biome and the belt text and then composelyrics.py which ran with the new text from wordchange and the Pais Tropical lyrics to get my final songLyrics.txt. All these programs were made under the guidance of the class notes so what they do is they take parts of the text and randomly re-arrange them into new texts. This is why there are periods on my final song: because getting rid of all the periods in the country list was way to hard, so I ended up leaving them and I think they work quite well to pretend a rythm within this composition.

background by freepik.com

background by freepik.com

On my way to the cocoa shaker

yes, that is my goal, what is it? 

A mexican cocoa shaker

I find them not only crazy  beautiful, but incredibly useful...I mean foamed cocoa, what else would anyone need in life.

So before I aspire to even try and do one of those I went and did the skill builder in the wood lathe aiming to learn how to do the rings first.

I started off with a piece given by Ben, I have no idea what kinda wood it is, but it is very very hard wood

First ring was a a good success, it took me around 20 minutes to get it loose

After this first ring though I noticed that as I tried to work the wood it kept on stoping on me. So I sharpen the tools several times...worried I was doing something wrong because wood was still not being properly chieseled.

Then as I was still pushing into the piece the lathe stopped completely, terrified that I was doing something wrong I checked the whole set to discover I had been kicking the connection and finally got it unplugged.

But that was not my problem. As I incorporated myself I grabbed on my piece and discovered it was loose. That was the problem!! A little adjustment on the live part of the lathe and I was good to go. I did a big ring, worked the rest of the cubic part in the middle into a cylinder and did another ring that sadly broke.

So I would say I have the feel of what it takes to make a ring, but I am a LONG way away from making a decent one, and I say that moving forward I need to find a proper wood to work with, I do know that the mexican shakers are made out of ocote pine which is quite soft.

Stay tuned for the next atempt