Tuesday, November 25, 2014

Post #9 - Hooking up the motors

This week was entirely spent trying to get a motor moving. We had to contact an outside source (Dr. Ron Tuttle from UNK) to give us some advice since Taylor and I have zero prior experience with electronics.

After meeting with him, we started plugging stuff in. Our current state with the robot is that our power source has power (good), the motor driver that controls the motor has a green light (good), however when we try sending power to the actual motor, the driver flashes red (bad). We are debugging and meeting with Dr. Tuttle again next week.

Total Time: 6 hours

Wednesday, November 19, 2014

Post #8 - Web Page Finished

We have decided to go with an online version of the ordering system. This online website can be accessed from anywhere in the world, allowing people to 'order' drinks wherever they are with their mobile phones. The Raspberry Pi will then read the database from this external server and handle the orders accordingly.

The webpage can be found here:

http://zonbandit.com/order.php

This page will be seen by the customer. It allows them to order a drink that goes into the queue.


http://zonbandit.com/admin.php

This page asks for all the liquids currently set up in the robot.


http://zonbandit.com/admin2.php

This page asks how they would make the drink by selecting the combination of liquids from the previous page.


Time spent: 12 hours (learning PHP and serverside coding)

Monday, November 17, 2014

Post #7 - WiFi Fixed (Finally) and Webpage Beginnings

After countless (15+) hours of trying to find a solution to the WiFi intermittent connection, I stumbled across an idea from someone - the Raspberry Pi wasn't able to give enough power to the WiFi adapter. Supposedly, these adapters take quite a bit of bower (over 500 mA), and the Pi can only give a max of 500 mA through its USB ports. This was all theory, but I as I researched I found similar recommendations.

Thus, my quest to find a powered USB hub was on. I tried finding a simple, cheap, one, but there were NO recommendations that I could find that were suited for the Pi (so that it didn't fry it). After searching long enough, I settled on a little more expensive solution - PiHub (http://shop.pimoroni.com/products/pihub).

Once I plugged the powered hub in, everything was working perfectly! WiFi was no longer dropping, and I could now power all my USB gadgets through this hub instead of the Pi. What a relief!

----

Next up this week was getting our database set up. We have decided that since the whole system must be connected to a WiFi network in order to be controlled via user's phones, then we had no reason to keep the database locally on the Pi. Therefore, we will be hosting the database and webpage on our own server which will allow people to access it from ANYWHERE, and off the WiFi network.

The beginnings of a great webpage:

http://roqetmarketing.com/drinkmixer/hey.php

Saturday, November 8, 2014

Post #6 - More Wifi Issues

Wifi is becoming a bit of a pain. It seems that when the internet/router goes down at my home, the DHCP is having troubles renewing the lease (even after I set the time to only 10 seconds to renew). Anyways, manually running some commands got it up and working for me (below). I suspect I may have to have some detection in the program that if the wifi is down, try to run these commands via a shell script.

Link to post that solved my issue:

http://www.raspberrypi.org/forums/viewtopic.php?t=72282&p=521088


1. sudo dhclient -v -r wlan0
2. ifconfig
3. sudo dhclient -v wlan0

Will update this post if I find another, simpler, way to get around this.

Update 1:

After hours and hours of research, this appears to not work. I finally came across a possible lead:

iwlist wlan0 scan

Returns my wifi connection sometimes, and sometimes not. This gave me some extra search terms to try and figure out a possible fix. After coming across a post about power issues, I have determined (for now) that the wifi adapter I am using requires too much power. The Raspberry Pi only outputs a certain amount of volts/amps, which wasn't enough, causing intermittent connection problems.

I have ordered a powered USB hub (http://shop.pimoroni.com/products/pihub) to ideally fix the issue.