Monday 27 April 2015

Sheepish Endeavours Completed



George is a funny little sheep. Unfortunately, his fifteen minutes of fame are over, and since I have to return the fidgets to the History Department, his ability to respond to his environment is also gone. I removed the phidgets, another invasive surgery, but I was able to stitch him together again successfully. He is just as cute as ever.

George has taught me many things about creating an interactive exhibit, mostly that it is a lot of work and requires almost inexhaustible amounts of tweaking. I am glad I was able to both try my hand at programming and put my sewing skills to work. I would have liked to make George more complicated, but my workload and George's waistline would not have accommodated it.

If I were to do this project again, I am not sure that I would use a distance sensor. It is a rather unpredictable phidget and requires a lot of troubleshooting. The touch sensor was a good call because it is very simple, either on or off, and it was very well hidden in George's head.

I thoroughly enjoyed this project and although my talking sheep is no more, I did leave one piece of technology in George: a speaker. He is now the world's cuddliest sound-system and he will always be able to tell me a sheep joke if the mood strikes me. :)

The Sheep Thrills of Programming 2

So I finally figured out all the programming. Here is a picture of my patcher:


Starting in the top left corner, we have the section of code that turns the sensors on. Once they are activated, the sensors each generate numbers. These numbers are sent out of the bottom of that section ("send distance" and "send touch") and received by the receivers ("receive distance" and "receive touch") on the next two columns of code. The numbers are then scaled down by the “scale” objects. This takes the numbers between 0 and 1000 and scales them down to between 0 and 10. Below the “scale” objects are “if” statements. These send the conditions of action.

For the distance sensor section of code, I have added two “if” statements. The one on the left tells the patcher to activate (known as a “bang” in Max 7) if the number is greater than 0. The one on the right tells it to send a “bang” if the number is smaller than 1. This section of code is designed to prevent the sensor from activating repeatedly when someone is standing near George.

The little box with the pointed, solid line is a “gswitch2.” This object changes the direction of the bang. When it is in the “off” (or 0) position, the bang cannot activate the code below (it is currently in the “on” [or 1] position).

There is another “gswitch2” below the first that basically controls which audio snippet is selected for playback. The “bang” travels through the “switch” and a “trigger” (an object that sends one “bang” to multiple outputs), which activates a “counter” object. This object counts up from 0 to 6 and then restarts. The number it generates will select what audio track is selected. The first audio track is number 1, the second is 2, and so on. So if the counter counts 1 after the first “bang,” it will activate the first track. When it receives another “bang,” it counts 2 and activates the next track, and so on.

Below the “counter,” there is also another “if” statement. This statement sends a “bang” if the number displayed by the counter is lesser than or equal to 1. Below that is a 3-second delay that will “bang” the fifth track. This piece of code was added so that I could play track 1 (“Hi! My name is George”) followed three seconds later by track 5 (“Pat my head if you want to hear a sheep joke!”).

The “trigger” object also sends a “bang” to a “message” that contains the number 1. This “message,” when banged, will turn the “trigger” off so that no new input will be accepted. It also sends a “bang” to a “delay” object that waits for a certain amount of time before sending the “bang” it received. After the delay, the “bang” is sent to a “message” that contains the number 0, which will open the “gswitch2” again and allow it to accept new input. This ensures that two tracks cannot start playing at the same time.

That is basically it. The touch sensor code works the same way. I included some extra messages to the right of the audio tracks that, when pressed, will activate a specific track. I added these for easy access and for demonstration purposes.

Voila! Now you understand what makes George tick. It is a simple patcher once you understand how it works, but it has fairly hilarious outcomes when powering a talking sheep.

Sheep speak 2

You may recall that I had originally planned to have a very sassy sheep. No longer! George has informed me that insulting people makes him uncomfortable. He wants to be a friendly sheep who makes people laugh. With this in mind, we went to the digital history lab in the UWO History Department and recorded some new phrases for George. This took a little figuring out because the microphones are connected to a Mac, a system I am not very familiar with. Here is what he had to say to my friend Kelly in Ottawa:
George thinks he is a comedian and has quite a repertoire of sheep related jokes. Here are just a few:
The first interaction George will have with someone is when they pass in front of him. He will exclaim, "Hello, my name is George. Pat my head if you want to hear a sheep joke!" At this point, the victim (presumably) will pat George's head and George will reward them with a sheep joke. It is a simple system, but I hope that a randomly talking sheep will intrigue, startle (possibly frighten), and definitely delight passersby. The final presentation of our projects is soon so hopefully George will be on his best behaviour. I’ve warned him not to be baa’d.

Little Sheep of Horrors

The time has come. George is going for his operation today. I have to implant an infrared distance sensor, a touch sensor, and a speaker into his soft, plush body.


George saying goodbye to his mice friends 


All the stuffing removed from George 

I have grown very attached to George and did not want to disfigure him unnecessarily, so I decided the best place to make the first incision was in the seam on his back. Once I had made a large enough hole, I removed the stuffing from his body and head.




De-stuffed George next to the soon to be implanted technology


Touch sensor implanted in George's head 

Now I could access the inside of the fur to sew the implants in. I debated for a time where to attach the touch sensor but decided to sew it into his head so that he would activate when people patted his head. I had to turn his head inside out, of course, to access the area that needed to be sewn.


Sensor implanted in neck 

One sensor down, one to go. The distance sensor, I decided, would be best implanted in George’s neck, where his bowtie was. I removed the bowtie and began the tracheotomy.

The seams of George’s body naturally joined at this juncture, so I just removed a couple of stitches to create a big enough hole and sewed around it, keeping the fur tight around the sensor so that it would not move. These sensors very helpfully included some holes at the extremities that allowed me to secure them very well.

Now that all the sensors were in place, I stuffed George with a small speaker that I happened to own. It was a little big for the hole I had created, but with some persuasion, I was able to squeeze it in. I attached all the necessary cables to the sensors and speaker and made a small hole in a surreptitious area under his tail for the wires to exit.



I proceeded to re-stuff George and sew him back up. Since I had to remove his bowtie so that it would not obscure the distance sensor, I sewed it to his ear. Now that George has his new implants, I just have to teach him how and when to speak. Stay tuned for some more Sheep Thrills of Programing and more Sheep Speak!


Ciber Sheep

Wednesday 1 April 2015

Sheep Speak

George is becoming more vocal every day! Today, he learned to say a variety of lovely things such as "I'm kind of a baaad ass". I also taught him some Shakespearian insults including "away you mouldy rogue, away!" Thanks to Nikki Michienzi for lending me her voice and her witty comments. Now all that remains to do is to help George use his new vocabulary in an appropriate setting. I will once again resort to Max 7 to accomplish this. For the moment, George can speak but he doesn't know when to stop. I am still working through some minor issues. Once that is done, the next step is to implant the sensors and speaker into George.

Here is my favorite thing he says so far: