[update] talking bunnies

by lefroyobunny

My final project is in full swing right now. There have been many challenges toward completing this project that I’m working to overcome. At the current stage of my project, I’ve accomplished several things.

1. I am able to connect my Wiflys to the internet, and it is able to get information from websites.

In my initial projet plan, I predicted that the setup of the Wifly will take the most time, and I was correct. The setup of the wifly has been the meat of the project thus far. It has been a source of headache for weeks, but I was finally able to configure it correctly and receive a positive behavior last week. The documentation of the wifly can be found on the Sparkfun website, scroll down and click on “Reference Guide (RN-131C)”. I always reference documentation whenever I work on a coding project. However, I found the Wifly documentation to be too technical and I didn’t understand a lot of the protocols it describes. Nonetheless, I was able to get my Wifly into AdHoc mode by following the steps described in section 15 of the reference guide. Even though getting into AdHoc mode is one step closer to what I want to be able to do, it is not sufficient. For example, having both wifly be in adhoc mode, I can sent and receive with both modules when they are within a certain distance, but not if one is across the country from the other. My ultimate goal is to get them both to connect to a wifi network.

Next, I went to Sparkfun and tried to go through the Wifly Talking Speaker Jet tutorial. Again, I ran into problems. It turns out that the code in the Wifly Serial Library is not optimized for the Arduino 1.0 software, the newest update. If you wish your code to compile on the newest Arduino software, please download this package, and put it in your Arduino library. In that package, you will find a version of the Wifly Serial Library that I edited to be compatible with the new Arduino 1.0 software. I found this guide from Cairo Hacker Space helpful in configuring the wifly. The code that he has on the website does not compile, but the setup instructions are correct.

I was still running into a lot of problems because I can not get my wifly to talk to the Arduino. This is because I am not able to configure the UART chip on the wifly. By this time,  I am nearing the end of the time I allotted to setup/configure the wifly on the initial timeline. So, I asked Leah for help. With her help, I am finally able to configure the UART and allow my Arduino to talk to the wifly. Here is the code that configures the UART chip. Next, I ran the  ”getWebClient” sketch in the Wifly Serial Package. See this video for the behavior.

This means the wifly works! It shows that it can get the html of the google home page. If you have a website, change “google.com” in line 14 to your site url and it will pull the html of the index page and display it in the serial monitor.

To make it easier to use, I’ve soldered headers onto the wifly so that it can be plugged into the arduino pins.

headers

Here is a scan of my circuitry system as of now. It may get more complicated if I need to input more sensors.

2. I have finished knitting my two stuffed bunnies.  I ran into all the problems that a beginner knitter would run in to. Luckily, Emily is willing to offer her expert knitting tips. Right now, the bunnies are knitted, but I have not closed the top of the heads because I am still making sensors to embed into them.

bunnies

3. Currently, I am working on creating an online database to manage signals from one bunny and send it to the next.

I created a scripts account from SIPB (hylinlin.scripts.mit.edu), and I am using phpMyAdmin co-currently. Right now, I am learning PHP at a rather sped-up pase from web3schools.com. The idea is shown in the below diagram.

There are still many things I need to do to make the project successful.

1. Make the sensors.

I will make pressure sensors (ears) , stroke sensors (head) , and a capacitance sensor (body) for each of the stuffed animals (inputs). The outputs will be sound (speakers) and light (LEDs) on the respective stuffed animals. Currently, I am also working on embedding a speaker into the stuffed animal. The media has to be down-graded  to a 8bit mono-sound. I am following a tutorial from the High-Low Tech group called Simple Arduino Audio Examples.

2. I need to calibrate the sensors so that they perform logically.

3. I need to test out the entire system once I have created the SQL database.

4. I need to come up with a way to store all the sensors and the arduino/wifly so that the stuffed animal is still a stuffed animal.