Thursday, October 30, 2014

Post #5 - Raspberry Pi Setup

As I am the one working with the majority of the programming for this project, I have began setting up the Raspberry Pi.

Issues:

1.

WIFI!! - I got it connected originally using this article:

http://raspberrypihq.com/how-to-add-wifi-to-the-raspberry-pi/


Worked fine for a week solid. Then our router at home got reset and things got all messed up. After debugging for 2 hours I still had no resolve. The next day I checked up on it and it was working again. I BELIEVE the issue was caused by the DHCP lease not renewing (the default lease renewal is 36000 seconds, or 10 hours!), so I changed that to 600 seconds for any future problems. (see next post -- NOT WORKING)



Installations:

1. Arduino IDE

Followed this guide to install and connect Arduino:

http://razzpisampler.oreilly.com/ch10.html


2. Raspberry Pi to Arduino connection:

http://blog.oscarliang.net/connect-raspberry-pi-and-arduino-usb-cable/


3. MySql was needed (simple installation). All MySql is done locally right now. We may move to online servers later on.

4. Adafruit IDE - probably the best find of this entire project. I was having problems figuring out how to program efficiently, timely, and making sure it would work on the Pi. I tried setting up a similar environment on my Windows (tried a VMWare box, all on Windows, etc) and my first conclusion was to use TightVNC which is a remote controller to the Raspberry Pi. This allowed me to work on my PC that I was comfortable using, while working directly on the Pi. However, the Pi has minimal hardware so the speeds that I could program at were drastically reduced. ALSO, I couldn't find any Python IDE to work on the Pi, so I was just coding in a simple notepad file. Not good!

Then, I came across the wonderful Adafruit IDE. Wow is it incredible! This allows me to program on my desktop computer all via my BROWSER. The code I change in the browser is automatically pushed to a Bitbucket repository, which is then automatically pushed onto the Pi. Talk about cool!

http://raspberrypihq.com/how-to-add-wifi-to-the-raspberry-pi/

6. Apache and PHP5 installed


7. Other miscellaneous things were installed. Not much importance.


Edit: Through a lot of pain, I've found out that you should install the WebIDE LAST before anything else. It's caused a lot of problems with other installations and is done best when it's installed last.

Sunday, October 19, 2014

Post #4 - Parts Are In!

We received the parts this week! Seeing everything in our hands makes for a very exciting week ahead. It's like Christmas opening up all our gadgets and toys!

Once we received the parts Taylor immediately began discussing ideas for the build of the robot with his neighbor (who is in construction). I took home the Arduino and unpackaged my Raspberry Pi. The Pi is now setup to work on my TV, so the next steps for me will be to start getting some test scenarios setup with Python.

First test case: getting a connection between the Arduino and the Pi. I hope to string a small ethernet cord between the two mini-computers and use a LAN connection for getting messages sent to each other.

For example:

1. The Raspberyy Pi will see that there is a new drink order. It grabs the details.
2. It will send a command to the Arduino indicating what motor to spin and for how long. I.e. - if it needs to get to the bottom 180 degrees from the 'home' position, it would tell it to spin the motor for that long.
3. The Arduino will send a command back saying that it has moved there and has dispensed the liquid.
4. Raspberry Pi will send the next item (next liquid to be dispensed) in the queue to the Arduino.
5. Repeat.

Sunday, October 12, 2014

Post #3 - Initial Design Started

More formal sketches were hand-drawn this week. Other than that, we're just waiting for our parts to come in and doing more research on the best possible way to make it as efficient as possible.

One thing we came to the conclusion of is that we will have to rotate the bottom base, rather than the bottles up top. Two reasons:

1. Future considerations - if we ever refrigerate the top part, then the coils would twist
2. Solenoid Valves - The wires for the valves (that are attached to the opening of the bottles) would twist up since all our electrical will be sitting at the base.

Sunday, October 5, 2014

Post #2 - Materials Ordered

The link below details all the hardware we ordered from using our student fees for this class:

http://banditim.com/Supply%20list.xlsx

We will be purchasing the materials (the entire stand to hold everything and such) from our own pockets so that we can keep it after this semester. Everything will be trial and error, so having the student fees as a cushion really helps the wallet.

All items are expected to be in by October 31. Taylor and I have agreed to split up our two tasks to be completed by that date into:

Taylor: Build the entire functional stand
Neil (me) : Program Raspberry Pi and Arduino to work together and send 'theoretical' commands to make 'theoretical' motors move