<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.phidgets.com/docs21/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwbenedi</id>
	<title>Phidgets Legacy Support - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.phidgets.com/docs21/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwbenedi"/>
	<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/Special:Contributions/Mwbenedi"/>
	<updated>2026-04-14T23:33:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22905</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22905"/>
		<updated>2012-11-28T21:11:10Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
[[File:Iptraf-dstat1.gif|561px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|5182&lt;br /&gt;
|4.99&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|19.7&lt;br /&gt;
|18.7&lt;br /&gt;
|0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter, the Patriot adapter, and the No-name 300M adapter all had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter and No-name 300M Adapters were considerably more reliable, only suffering an average of less than 20 retransmits per 20 minute session. The EDUP EP-MS150NW and No-name 150M adapters were notably worse, both having thousands of retransmits and multiple catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter and the No-name 300M adapter were easily the fastest adapters we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. The Phidgets adapter performed very poorly, achieving one-tenth the average speed of the Patriot adapter and No-name 300M adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they all seem to be. However, it seems that the performance of a wireless adapter is closely related to the Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Driver&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|ZD1211B&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|RT3072&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With this new information we can see that the No-name 300M adapter uses the same driver as the Patriot adapter, which might explain why they both have such good performance. Additionally, the No-name 150M adapter and the EDUP EP-MS150NW adapter both share the same driver, which might explain why the both have such poor performance. Finally, the ASUS adapter and the EDUP EP-N1528 adapter also share the same driver.&lt;br /&gt;
&lt;br /&gt;
From the information above, it can be concluded that the driver has a large impact on the performance of a wireless adapter, but it does not necessarily decide it&#039;s fate. For example, the EDUP-N1528 adapter had a much lower retransmission rate than the ASUS adapter did. So although it might be worth testing several different adapters that use different drivers, it may also be worth testing devices that use the same adapter. &lt;br /&gt;
&lt;br /&gt;
Ultimately, if performance and reliability is important to you, it&#039;s worth testing a few different products. Because, although the tests we ran on these devices were not necessarily thorough, they helped us narrow down the list of suitable devices, letting us cut out extremely unreliable adapters such as the No-name Wireless N 150M, Dlink DWA-140, ASUS USB-N13 and EDUP-MS150NW.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22904</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22904"/>
		<updated>2012-11-28T17:52:25Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
[[File:Iptraf-dstat1.gif|561px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|5182&lt;br /&gt;
|4.99&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|19.7&lt;br /&gt;
|18.7&lt;br /&gt;
|0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter, the Patriot adapter, and the No-name 300M adapter all had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter and No-name 300M Adapters were considerably more reliable, only suffering an average of less than 20 retransmits per 20 minute session. The EDUP EP-MS150NW and No-name 150M adapters were notably worse, both having thousands of retransmits and multiple catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter and the No-name 300M adapter were easily the fastest adapters we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. The Phidgets adapter performed very poorly, achieving one-tenth the average speed of the Patriot adapter and No-name 300M adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they all seem to be. However, it seems that the performance of a wireless adapter is closely related to the Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Driver&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|ZD1211B&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|RT3072&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With this new information we can see that the No-name 300M adapter uses the same driver as the Patriot adapter, which might explain why they both have such good performance. Additionally, the No-name 150M adapter and the EDUP EP-MS150NW adapter both share the same driver, which might explain why the both have such poor performance. Finally, the ASUS adapter and the EDUP EP-N1528 adapter also share the same driver.&lt;br /&gt;
&lt;br /&gt;
From the information above, it can be concluded that the driver has a large impact on the performance of a wireless adapter, but it does not necessarily decide it&#039;s fate. For example, the EDUP-N1528 adapter had a much lower retransmission rate than the ASUS adapter did. So although it might be worth testing several different adapters that use different drivers, it may also be worth testing devices that use the same adapter. &lt;br /&gt;
&lt;br /&gt;
Ultimately, if performance and reliability is important to you, it&#039;s worth testing a few different products. Because, although the tests we ran on these devices were not necessarily thorough, they helped us narrow down the list of suitable devices, letting us cut out extremely unreliable adapters such as the No-name Wireless N 150M, Dlink DWA-140, ASUS USB-N13 and EDUP-MS150NW.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22903</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22903"/>
		<updated>2012-11-28T17:49:29Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Iptraf-dstat1.gif|561px|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|5182&lt;br /&gt;
|4.99&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|19.7&lt;br /&gt;
|18.7&lt;br /&gt;
|0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter, the Patriot adapter, and the No-name 300M adapter all had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter and No-name 300M Adapters were considerably more reliable, only suffering an average of less than 20 retransmits per 20 minute session. The EDUP EP-MS150NW and No-name 150M adapters were notably worse, both having thousands of retransmits and multiple catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter and the No-name 300M adapter were easily the fastest adapters we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. The Phidgets adapter performed very poorly, achieving one-tenth the average speed of the Patriot adapter and No-name 300M adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they all seem to be. However, it seems that the performance of a wireless adapter is closely related to the Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Driver&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|ZD1211B&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|RT3072&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With this new information we can see that the No-name 300M adapter uses the same driver as the Patriot adapter, which might explain why they both have such good performance. Additionally, the No-name 150M adapter and the EDUP EP-MS150NW adapter both share the same driver, which might explain why the both have such poor performance. Finally, the ASUS adapter and the EDUP EP-N1528 adapter also share the same driver.&lt;br /&gt;
&lt;br /&gt;
From the information above, it can be concluded that the driver has a large impact on the performance of a wireless adapter, but it does not necessarily decide it&#039;s fate. For example, the EDUP-N1528 adapter had a much lower retransmission rate than the ASUS adapter did. So although it might be worth testing several different adapters that use different drivers, it may also be worth testing devices that use the same adapter. &lt;br /&gt;
&lt;br /&gt;
Ultimately, if performance and reliability is important to you, it&#039;s worth testing a few different products. Because, although the tests we ran on these devices were not necessarily thorough, they helped us narrow down the list of suitable devices, letting us cut out extremely unreliable adapters such as the No-name Wireless N 150M, Dlink DWA-140, ASUS USB-N13 and EDUP-MS150NW.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=File:Iptraf-dstat1.gif&amp;diff=22902</id>
		<title>File:Iptraf-dstat1.gif</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=File:Iptraf-dstat1.gif&amp;diff=22902"/>
		<updated>2012-11-28T17:47:33Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22901</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22901"/>
		<updated>2012-11-27T21:03:21Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|5182&lt;br /&gt;
|4.99&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|19.7&lt;br /&gt;
|18.7&lt;br /&gt;
|0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter, the Patriot adapter, and the No-name 300M adapter all had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter and No-name 300M Adapters were considerably more reliable, only suffering an average of less than 20 retransmits per 20 minute session. The EDUP EP-MS150NW and No-name 150M adapters were notably worse, both having thousands of retransmits and multiple catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter and the No-name 300M adapter were easily the fastest adapters we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. The Phidgets adapter performed very poorly, achieving one-tenth the average speed of the Patriot adapter and No-name 300M adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they all seem to be. However, it seems that the performance of a wireless adapter is closely related to the Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Driver&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-N1528&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|ZD1211B&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|RT3072&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|RTL8192CU&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|RT5370&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|RTL8191SU&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With this new information we can see that the No-name 300M adapter uses the same driver as the Patriot adapter, which might explain why they both have such good performance. Additionally, the No-name 150M adapter and the EDUP EP-MS150NW adapter both share the same driver, which might explain why the both have such poor performance. Finally, the ASUS adapter and the EDUP EP-N1528 adapter also share the same driver.&lt;br /&gt;
&lt;br /&gt;
From the information above, it can be concluded that the driver has a large impact on the performance of a wireless adapter, but it does not necessarily decide it&#039;s fate. For example, the EDUP-N1528 adapter had a much lower retransmission rate than the ASUS adapter did. So although it might be worth testing several different adapters that use different drivers, it may also be worth testing devices that use the same adapter. &lt;br /&gt;
&lt;br /&gt;
Ultimately, if performance and reliability is important to you, it&#039;s worth testing a few different products. Because, although the tests we ran on these devices were not necessarily thorough, they helped us narrow down the list of suitable devices, letting us cut out extremely unreliable adapters such as the No-name Wireless N 150M, Dlink DWA-140, ASUS USB-N13 and EDUP-MS150NW.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22900</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22900"/>
		<updated>2012-11-27T20:41:04Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|Edup EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 150M Adapter&lt;br /&gt;
|5182&lt;br /&gt;
|4.99&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|No-name Wireless N 300M Adapter&lt;br /&gt;
|107&lt;br /&gt;
|18.6&lt;br /&gt;
|0.67&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter and the Patrio adapter had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter was considerably more reliable, only suffering an average of about 7 retransmits per 20 minute session. The EDUP EP-MS150NM was notably worse that the other adapters, reaching an average of over ten-thousand retransmits and four catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter was easily the fastest adapter we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. While the Phidgets adapter performed poorly, achieving one-tenth the average speed of the Patriot adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they seem to be. However, it seems that the results of a test are closely related to Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22899</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22899"/>
		<updated>2012-11-27T20:01:29Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|Edup EP-N1528&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink DWA-140&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot Wireless N 300Mbps&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|ASUS USB-N13&lt;br /&gt;
|1064&lt;br /&gt;
|10.0&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|EDUP EP-MS150NW&lt;br /&gt;
|13871&lt;br /&gt;
|3.62&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Right away you can see that a few of the devices stand out as being better than others in terms of reliability or speed. For example, the current Phidgets wifi adapter and the Patrio adapter had relatively low retransmits and zero catastrophic failures. Though, it should be noted that the Patriot wifi adapter was considerably more reliable, only suffering an average of about 7 retransmits per 20 minute session. The EDUP EP-MS150NM was notably worse that the other adapters, reaching an average of over ten-thousand retransmits and four catastrophic failures per 20 minute session.&lt;br /&gt;
&lt;br /&gt;
In addition, we can see that the Patriot adapter was easily the fastest adapter we tested, with the Edup EP-N1528 and the ASUS USB-N13 following at half the speed. While the Phidgets adapter performed poorly, achieving one-tenth the average speed of the Patriot adapter.&lt;br /&gt;
&lt;br /&gt;
What may become immediately apparent to someone looking at these results is how vastly different they seem to be. However, it seems that the results of a test are closely related to Linux driver associated with them. By using the command &amp;quot;lsusb&amp;quot; in the terminal while we have one of our wifi adapters plugged in, we can see what driver they are using.&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22878</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22878"/>
		<updated>2012-11-27T16:36:34Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased (Each number is taken as a average of all tests): &lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Adapter Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Retransmits&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Connection Speed (Mbps)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Catastrophic Failures&lt;br /&gt;
|-&lt;br /&gt;
|Edup&lt;br /&gt;
|259&lt;br /&gt;
|10.2&lt;br /&gt;
|0.67&lt;br /&gt;
|-&lt;br /&gt;
|Phidgets&lt;br /&gt;
|98.7&lt;br /&gt;
|1.77&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Dlink&lt;br /&gt;
|3454&lt;br /&gt;
|5.9&lt;br /&gt;
|1.33&lt;br /&gt;
|-&lt;br /&gt;
|Patriot&lt;br /&gt;
|7.33&lt;br /&gt;
|18.5&lt;br /&gt;
|0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22877</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22877"/>
		<updated>2012-11-27T16:21:45Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Is Difficult ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wifi Testing Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number suddenly shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, well... you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot of options. The kind of things that I thought were most important to test were all things that could be tested with three very basic programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iperf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. You can also set other variables, such as packet size, TCP delay, or TCP Maximum segment size. For all intents and purposes, this forms the backbone of our testing suite. And though we&#039;re not going to bother fiddling with some of the more complicated options, we&#039;re going to be able to get a lot of important data out of the tests we run with this software. &lt;br /&gt;
&lt;br /&gt;
To use iperf, we&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;. On the other end is our SBC connected to the wireless network via some wifi adapter you wish to test, which is going to be considered out &amp;quot;client&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, open two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with wireless signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this, when it&#039;s maxing out it&#039;s capabilities, and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;iptraf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection we&#039;ve set up with iperf. It has a pretty, colourful interface, at least when you compare it with the other programs we&#039;re using, and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful, but you may want to explore the program a bit and learn some of its features.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. That is, if the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it. And while I admit that this is a very primitive way of monitoring the network, it did in fact give me the results that I needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;watch &#039;netstat -s | grep retransmited&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had well over 1000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Collecting Data From Your Tests ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data. Though, If you&#039;re planning on doing a lot of tests, you may want to find some kind of way to automate the tests anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Testing Conclusions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22874</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22874"/>
		<updated>2012-11-26T22:17:45Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is difficult&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
-About the tools that I used to monitor the wifi devices.&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot. The kind of things that I thought were important to test were all things that could be tested with three simple programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== iperf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. For all intents and purposes, it forms the backbone of our testing suite. We&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== iptraf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection. It has a pretty, colourful interface when you compare it with the other programs we&#039;re using and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful.&lt;br /&gt;
&lt;br /&gt;
You can get a lot of data out of this program, but to be totally honest, I just used it as a way of checking to make sure that the wireless adapter hadn&#039;t failed catastrophically. If the numbers stopped changing for a period of time, I assumed that the connection had been completely lost and I took note of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== watch &#039;netstat -s | grep retransmited&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had over 1000!&lt;br /&gt;
&lt;br /&gt;
-About the results that I was able to gather immediately after single and multiple tests were completed.&lt;br /&gt;
&lt;br /&gt;
You can experiment by running these tests at different distances and taking note of how the performance is affected. For each wifi adapter I tested, I ran three tests at short range and then three more at the longest range I could reach without having the wireless adapter completely disconnect. During the tests I took note of three things: the average bandwidth, the number of retransmits, and the number of times that the wifi adapter failed catastrophically. (By this I mean that the wifi adapter lost connection with the server.) Depending on how much testing you want to do, you could keep track of other things too, such as minimum bandwidth and maximum bandwidth. However, it&#039;s difficult to try and keep track of too many things at once without completely automating the tests, so I tried to gather only the most important data.&lt;br /&gt;
&lt;br /&gt;
In the end, these were some of the results that I gathered from some of the wifi adapters that we purchased:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22873</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22873"/>
		<updated>2012-11-26T21:40:45Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is difficult&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
-About the tools that I used to monitor the wifi devices.&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot. The kind of things that I thought were important to test were all things that could be tested with three simple programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== iperf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. For all intents and purposes, it forms the backbone of our testing suite. We&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== iptraf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one of the programs we&#039;re going to use to monitor the connection. It has a pretty, colourful interface when you compare it with the other programs we&#039;re using and lot&#039;s of nice options to monitor different parts of the connection. Personally, I found the &amp;quot;Detailed Interface Statistics&amp;quot; to be the most useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== watch &#039;netstat -s | grep retransmited&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had over 1000!&lt;br /&gt;
&lt;br /&gt;
-About the results that I was able to gather immediately after single and multiple tests were completed.&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22872</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22872"/>
		<updated>2012-11-26T21:38:03Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is difficult&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
-About the tools that I used to monitor the wifi devices.&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot. The kind of things that I thought were important to test were all things that could be tested with three simple programs.&lt;br /&gt;
&lt;br /&gt;
iperf&lt;br /&gt;
&lt;br /&gt;
This program lets you test bandwidth between two locations over a set amount of time. For all intents and purposes, it forms the backbone of our testing suite. We&#039;ll need to have a computer running Linux (preferably connected to our local network with an ethernet cable) in addition to our SBC. This Linux computer is going to be considered our &amp;quot;server&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
From our server, two terminal windows and use one of them to SSH into the SBC. On the server, run the command:&lt;br /&gt;
&lt;br /&gt;
iperf -s&lt;br /&gt;
&lt;br /&gt;
And on the SBC, run:&lt;br /&gt;
&lt;br /&gt;
iperf -c [ip address of server] -t 1200&lt;br /&gt;
&lt;br /&gt;
(If you don&#039;t know the ip address of the server you can find it by opening a third terminal window and typing: ifconfig )&lt;br /&gt;
&lt;br /&gt;
This will run a 20 minute long test. (you can change the length of the test by increasing or increasing the number 1200 above.) At the end, it will simply tell you the bandwidth over the network. For us, however, this program fills a vital role in flooding the network with signals. If the wifi adapter is going to fail, it&#039;s going to fail during a time like this and we&#039;re going to be able to see it.&lt;br /&gt;
&lt;br /&gt;
iptraf&lt;br /&gt;
&lt;br /&gt;
watch &#039;netstat -s | grep retransmited&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had over 1000!&lt;br /&gt;
&lt;br /&gt;
-About the results that I was able to gather immediately after single and multiple tests were completed.&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22871</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22871"/>
		<updated>2012-11-26T21:10:27Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is difficult&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Wireless signals are not constrained inside a tiny wire, they fly around in the air and bump into walls, people, animals, and even each other. A simple analogy might be to think about sending data across an ethernet cable as if you put a letter on a train in Chicago destined to New York. Unless the train derails, there&#039;s a pretty good chance that letter you sent is actually going to get to New York. Whereas sending data wirelessly would be like strapping your letter to a stray dog in Chicago and telling it to go to New York. I don&#039;t have the same confidence that your letter is ever going to arrive in New York. &lt;br /&gt;
&lt;br /&gt;
Different wireless protocols developed over the years have come to solve a lot of the issues that you can run into with wireless data transfers, but it&#039;s never going to be as simple as sending your data through a cable. Thes protocols need to implemented properly, and the hardware to transmit and receive signals can be very advanced. Small errors can render a device completely inoperable and utterly useless. And while large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to properly test every aspect of the devices in question, small companies and home users can&#039;t afford to be so lavish. Luckily, we don&#039;t have to spend a lot of money to narrow down the list of promising candidates and choose a good wifi adapter.&lt;br /&gt;
&lt;br /&gt;
-About the tools that I used to monitor the wifi devices.&lt;br /&gt;
&lt;br /&gt;
When it comes to wifi testing, there are a number of different tools you can use. When it comes to wifi testing on Linux, that number shrinks... a lot... And when it comes to wifi testing on Linux using only console-based applications, you don&#039;t have a lot of options. Fortunately, we don&#039;t need a whole lot. The kind of things that I thought were important to test were all things that could be tested with three simple programs.&lt;br /&gt;
&lt;br /&gt;
iperf&lt;br /&gt;
&lt;br /&gt;
iptraf&lt;br /&gt;
&lt;br /&gt;
watch &#039;netstat -s | grep retransmited&#039;&lt;br /&gt;
&lt;br /&gt;
This is actually more of a hack than a real program, but it works very well for what it is. By running this command in the terminal, you can see how many packets have been retransmitted since the device has been powered on. This number will update once every two seconds, so you can simply start it up and leave it running. Pay close attention to how many packets have been retransmitted. If the number climbs unexpectedly, you may have a problem with your wifi adapter. Typically, I found that good wifi adapters had 100 or less retransmits over a 20 minute test, while bad wifi adapters had over 1000!&lt;br /&gt;
&lt;br /&gt;
watch &lt;br /&gt;
&lt;br /&gt;
-About the results that I was able to gather immediately after single and multiple tests were completed.&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22870</id>
		<title>SBC3 Wifi Testing</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=SBC3_Wifi_Testing&amp;diff=22870"/>
		<updated>2012-11-26T20:36:25Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;This page is currently a work in progress&amp;#039;&amp;#039;&amp;#039;  While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is currently a work in progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While our current wifi adapters do work well on the SBC, they are, unfortunately, rather slow. And though the speed, or lack thereof, of our current wifi adapter rarely has a notable impact on our projects, it does occasionally raise some issues. So after it started to negatively affect the performance and functionality of one of our recent projects, we sought to find something a little faster and, if possible, more reliable than what we had available.&lt;br /&gt;
&lt;br /&gt;
But finding a fast and reliable wifi adapter isn&#039;t always as simple as going to the store and picking up the first thing you see. Most wifi adapters are created to work well with Windows and have very little concern for the select few users that might purchase their product to use with a Linux based operating system, such as the one that runs on the SBC. And though many of these same wifi adapters do work on Linux , the drivers to run them are rarely a shining example of perfection. The developers don&#039;t make enough money to justify perfecting the Linux drivers, they only want to get them working, not working well. The end result almost always has a handful of cut-corners and strange bugs popping up from time to time. So, inevitably, finding a fast and reliable wifi adapter means that you&#039;re going to have to do some testing yourself.&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-About why Wifi testing is difficult&lt;br /&gt;
&lt;br /&gt;
Wifi testing can be a very difficult thing to do. Large companies can afford to spend a million dollars, purchase some expensive equipment, hire some professionals, and build a warehouse to do all their testing in. Small companies and home users can&#039;t afford to be that lavish.&lt;br /&gt;
&lt;br /&gt;
-About the tools that I used to monitor the wifi devices.&lt;br /&gt;
&lt;br /&gt;
-About the results that I was able to gather immediately after single and multiple tests were completed.&lt;br /&gt;
&lt;br /&gt;
-About the final conclusion for all the wifi adapters that we tested. (Should I include exact prices here? Probably not. Definitely don&#039;t include links to the devices that I tested in the end. It&#039;s probably okay to include the actual names of the devices that we tested though. That is, is the names actually exist. It seems like many of the devices didn&#039;t even have proper names...)&lt;br /&gt;
&lt;br /&gt;
-Talk about the possibility for anyone to do any of their own testing at home and how they could streamline or automate the process to make it perhaps a little less time consuming.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22846</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22846"/>
		<updated>2012-10-31T19:59:41Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with your Single Board Computer, you really only have one feasible option: You can purchase the Phidgets Wi-Fi USB adapter. However, you can go through the very extensive process of recompiling the kernel to include all the drivers that you need to use a multitude of different wireless adapters.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or a bizarre love affair with your favourite wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What Wi-Fi Adapters Can I Use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the most part, if a wireless adapter works in Linux, then it will work on the SBC. And nowadays, nearly all wireless adapters are supported in Linux, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
[[File:PatriotNAdapter.jpg|thumb|file=|I used the Patriot Wireless N USB Adapter]]&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. Alternatively, we can also find out which linux driver it uses, but this is sometimes a little bit more difficult to find directly. In my case, a quick internet search shows us that this particular wireless adapter uses the &#039;&#039;&#039;r8712u&#039;&#039;&#039; driver. So now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recompiling The Kernel&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to this download package: [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz download] &lt;br /&gt;
&lt;br /&gt;
It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for your wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try to find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing New Firmware&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. Once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again, but please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that just won&#039;t work, you might want to purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=File:PatriotNAdapter.jpg&amp;diff=22845</id>
		<title>File:PatriotNAdapter.jpg</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=File:PatriotNAdapter.jpg&amp;diff=22845"/>
		<updated>2012-10-31T19:58:27Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: www.Patriotmemory.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;www.Patriotmemory.com&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22844</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22844"/>
		<updated>2012-10-31T19:55:37Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with your Single Board Computer, you really only have one feasible option: You can purchase the Phidgets Wi-Fi USB adapter. However, you can go through the very extensive process of recompiling the kernel to include all the drivers that you need to use a multitude of different wireless adapters.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or a bizarre love affair with your favourite wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What Wi-Fi Adapters Can I Use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the most part, if a wireless adapter works in Linux, then it will work on the SBC. And nowadays, nearly all wireless adapters are supported in Linux, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. Alternatively, we can also find out which linux driver it uses, but this is sometimes a little bit more difficult to find directly. In my case, a quick internet search shows us that this particular wireless adapter uses the &#039;&#039;&#039;r8712u&#039;&#039;&#039; driver. So now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recompiling The Kernel&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to this download package: [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz download] &lt;br /&gt;
&lt;br /&gt;
It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for your wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try to find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing New Firmware&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. Once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again, but please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that just won&#039;t work, you might want to purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22843</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22843"/>
		<updated>2012-10-31T19:53:58Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with your Single Board Computer, you really only have one feasible option: You can purchase the Phidgets Wi-Fi USB adapter. However, you can go through the very extensive process of recompiling the kernel to include all the drivers that you need to use a multitude of different wireless adapters.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or a bizarre love affair with your favourite wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What Wi-Fi Adapters Can I Use?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For the most part, if a wireless adapter works in Linux, then it will work on the SBC. And nowadays, nearly all wireless adapters are supported in Linux, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. Alternatively, we can also find out which linux driver it uses, but this is sometimes a little bit more difficult to find directly. In my case, a quick internet search shows us that this particular wireless adapter uses the &#039;&#039;&#039;r8712u&#039;&#039;&#039; driver. So now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recompiling The Kernel&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz this download package]. It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for your wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try to find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installing New Firmware&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. Once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again, but please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that just won&#039;t work, you might want to purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22842</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22842"/>
		<updated>2012-10-31T19:23:26Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with your Single Board Computer, you really only have one feasible option: You can purchase the Phidgets Wi-Fi USB adapter. However, you can go through the very extensive process of recompiling the kernel to include all the drivers that you need to use a multitude of different wireless adapters.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or a bizarre love affair with your favourite wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible usb Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. Alternatively, we can also find out which linux driver it uses, but this is sometimes a little bit more difficult to find directly. In my case, a quick internet search shows us that this particular wireless adapter uses the &#039;&#039;&#039;r8712u&#039;&#039;&#039; driver. So now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz this download package]. It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for your wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try to find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. Once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again, but please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that just won&#039;t work, you might want to purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22834</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22834"/>
		<updated>2012-10-29T20:58:07Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;THIS GUIDE IS STILL A WORK IN PROGRESS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the current moment, if you want to connect to a wireless network with your Single Board Computer, you really only have one feasible option: You can purchase the Phidgets Wi-Fi USB adapter. However, you can go through the very extensive process of recompiling the kernel to include all the drivers that you need to use a multitude of different wireless adapters.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or a bizarre love affair with your favourite wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible usb Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. Alternatively, we can also find out which linux driver it uses, but this is sometimes a little bit more difficult to find directly. In my case, a quick internet search shows us that this particular wireless adapter uses the &#039;&#039;&#039;r8712u&#039;&#039;&#039; driver. So now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz this download package]. It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for your wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try to find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. Once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again, but please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that just won&#039;t work, you might want to purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22833</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22833"/>
		<updated>2012-10-29T20:49:32Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;THIS GUIDE IS STILL A WORK IN PROGRESS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the current moment, if you want to connect to a wireless network with you Single Board Computer, you really only have one feasible option. You can purchase the Phidgets Wi-Fi USB adapter or you can go through the very extensive process of recompiling the kernel to include all the drivers that you need.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or some kind of bizarre love affair with another wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible usb Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. A quick internet search shows us that this particular wireless adapter uses either the &#039;&#039;&#039;r8192u_usb&#039;&#039;&#039;, &#039;&#039;&#039;r8712u&#039;&#039;&#039;, or &#039;&#039;&#039;rtl8192cu&#039;&#039;&#039; drivers. Now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
Rather than re-iterating something that has already been explained elsewhere on the site, I&#039;ll just point you to [http://www.phidgets.com/downloads/libraries/phidgetsbc2-kerneldev.tar.gz this download package]. It contains all the necessary files and information for recompiling the kernel. When you get to the part about installing new modules, you&#039;ll need to install the correct module for you wireless adapter. In my case, the Patriot Wireless N USB Adapter came with a cd that contained the correct module for me to install, so I did not have to go hunting for it on the internet. If you&#039;re not as lucky, you can try find the correct module on the [http://linuxwireless.org Linux Wireless Website].&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter. This process is a little easier and usually just involves using &amp;quot;apt-get install&amp;quot;. And once again, instead of re-iterating something that is better explained on another website, I&#039;ll point you to [http://wiki.debian.org/rtl819x this link]. In my case, I followed the guide to install the &#039;&#039;&#039;rtl8192u&#039;&#039;&#039; firmware.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve gone through all that, your wireless usb adapter should work just fine. If it doesn&#039;t, don&#039;t panic! This is a very complicated process and you might have messed up somewhere along the line. You can try following all the steps again. But please keep in mind that not all wireless adapters will work with the SBC. And if you happen to have one of those devices that jsut won&#039;t work, you might have to suck it up and purchase a Phidgets wireless usb adapter from our website. The benefit of using one of our adapters is that they work right out of the box!&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22832</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22832"/>
		<updated>2012-10-29T20:23:47Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;THIS GUIDE IS STILL A WORK IN PROGRESS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the current moment, if you want to connect to a wireless network with you Single Board Computer, you really only have one feasible option. You can purchase the Phidgets Wi-Fi USB adapter or you can go through the very extensive process of recompiling the kernel to include all the drivers that you need.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or some kind of bizarre love affair with another wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible sub Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. A quick internet search shows us that this particular wireless adapter uses either the &#039;&#039;&#039;r8192u_usb&#039;&#039;&#039;, &#039;&#039;&#039;r8712u&#039;&#039;&#039;, or &#039;&#039;&#039;rtl8192cu&#039;&#039;&#039; drivers. Now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;INSERT GUIDE ABOUT HOW TO RECOMPILE KERNEL WITH NEW DRIVERS HERE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22831</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22831"/>
		<updated>2012-10-29T20:22:57Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with you Single Board Computer, you really only have one feasible option. You can purchase the Phidgets Wi-Fi USB adapter or you can go through the very extensive process of recompiling the kernel to include all the drivers that you need.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or some kind of bizarre love affair with another wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible sub Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. A quick internet search shows us that this particular wireless adapter uses either the &#039;&#039;&#039;r8192u_usb&#039;&#039;&#039;, &#039;&#039;&#039;r8712u&#039;&#039;&#039;, or &#039;&#039;&#039;rtl8192cu&#039;&#039;&#039; drivers. Now that we know what we&#039;re looking for, we can recompile the kernel with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;INSERT GUIDE ABOUT HOW TO RECOMPILE KERNEL WITH NEW DRIVERS HERE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to install the new firmware for our wireless adapter.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22830</id>
		<title>Alternative Wi-Fi Adapters on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Alternative_Wi-Fi_Adapters_on_the_SBC&amp;diff=22830"/>
		<updated>2012-10-29T20:05:22Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: Created page with &amp;quot;At the current moment, if you want to connect to a wireless network with you Single Board Computer, you really only have one feasible option. You can purchase the Phidgets Wi-...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At the current moment, if you want to connect to a wireless network with you Single Board Computer, you really only have one feasible option. You can purchase the Phidgets Wi-Fi USB adapter or you can go through the very extensive process of recompiling the kernel to include all the drivers that you need.&lt;br /&gt;
&lt;br /&gt;
The process of recompiling the kernel is not an easy or simple task, so I would highly recommend against doing anything like this unless you have some kind of intense hatred for our wireless adapter or some kind of bizarre love affair with another wireless adapter. But I assume you wouldn&#039;t be reading this unless you fit into either of those categories, so let&#039;s continue on.&lt;br /&gt;
&lt;br /&gt;
The first thing you&#039;re going to want to do is select a Linux-compatible sub Wi-Fi adapter. Nowadays, nearly all wireless adapters are supported, but it&#039;s always worth doing a little bit of research before you go out and spend a bunch of money. If you&#039;re interested, there is a comprehensive list of known-working usb adapters on [http://linux-wless.passys.nl this website]. But for the purpose of this guide, we&#039;re going to go through the process of adding the drivers for the [http://www.patriotmemory.com/product/detail.jsp?prodline=6&amp;amp;catid=97&amp;amp;prodgroupid=163&amp;amp;id=973&amp;amp;type=24 Patriot Wireless N USB Adapter] (Part# PCBOWAU2-N).&lt;br /&gt;
&lt;br /&gt;
Linux wireless drivers depend on the chipset, not the actual product, so if we&#039;re going to have any hope of getting this wireless adapter to work on the SBC then we need to find out what chipset it uses. A quick internet search shows us that this particular wireless adapter uses either the r8192u_usb, r8712u, or rtl8192cu drivers. Now that we know what we&#039;re looking for, we can recompile the compiler with these new drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;INSERT GUIDE ABOUT HOW TO RECOMPILE KERNEL WITH NEW DRIVERS HERE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once we&#039;ve recompiled the kernel with the new drivers, we need to&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22789</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22789"/>
		<updated>2012-10-16T20:27:54Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple. (Please remember that you will need two wireless adapters to set up your ad-hoc network. One adapter for your SBC and one adapter for your desktop or laptop.)&lt;br /&gt;
&lt;br /&gt;
(You should also disable any current wireless connections you have on the SBC before you attempt to follow this guide.)&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
* logging into the SBC&#039;s web interface&lt;br /&gt;
* clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
* clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
* selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
* clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
You will also need to change the permissions of this file to make it an executable. You can do this by typing in:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
chmod +x wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is only in how we set up the wireless file. For your Linux based computer, the wireless file will look like this instead:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address. On the SBC, I used an ip address of &amp;quot;192.168.100.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished, you can reboot your computer, or alternatively, run the &amp;quot;wireless&amp;quot; script from the command line by navigating to the root directory and typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
./wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this is done, you should be able to connect to your SBC over the ad-hoc network.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22786</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22786"/>
		<updated>2012-10-16T20:13:03Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple. (Please remember that you will need two wireless adapters to set up your ad-hoc network. One adapter for your SBC and one adapter for your desktop or laptop.)&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
* logging into the SBC&#039;s web interface&lt;br /&gt;
* clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
* clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
* selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
* clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
You will also need to change the permissions of this file to make it an executable. You can do this by typing in:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
chmod +x wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is only in how we set up the wireless file. For your Linux based computer, the wireless file will look like this instead:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address. On the SBC, I used an ip address of &amp;quot;192.168.100.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished, you can reboot your computer, or alternatively, run the &amp;quot;wireless&amp;quot; script from the command line by navigating to the root directory and typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
./wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this is done, you should be able to connect to your SBC over the ad-hoc network.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22782</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22782"/>
		<updated>2012-10-16T19:28:16Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple. (Please remember that you will need two wireless adapters top set up your ad-hoc network. One adapter for your SBC and one adapter for your desktop or laptop.)&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is only in how we set up the wireless file. For your Linux based computer, the wireless file will look like this instead:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address. On the SBC, I used an ip address of &amp;quot;192.168.100.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished, you can reboot your computer, or alternatively, run the &amp;quot;wireless&amp;quot; script from the command line by navigating to the root directory and typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
./wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this is done, you should be able to connect to your SBC over the ad-hoc network.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22781</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22781"/>
		<updated>2012-10-16T19:20:51Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different, but not by much.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is how we set up the wireless file. For your Linux based computer, the wireless file will look like this:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22780</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22780"/>
		<updated>2012-10-16T19:18:31Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different, but not by much.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is how we set up the wireless file. For your Linux based computer, the wireless file will look like this:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight line start=&amp;quot;1&amp;quot; lang=java&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22779</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22779"/>
		<updated>2012-10-16T19:12:47Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
----&lt;br /&gt;
cd /&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
----&lt;br /&gt;
pico wireless&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
----&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
----&lt;br /&gt;
cd /etc&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
----&lt;br /&gt;
pico rc.local&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
----&lt;br /&gt;
/wireless&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different, but not by much.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is how we set up the wireless file. For your Linux based computer, the wireless file will look like this:&lt;br /&gt;
----&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22778</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22778"/>
		<updated>2012-10-16T19:08:40Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different, but not by much.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is how we set up the wireless file. For your Linux based computer, the wireless file will look like this:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22777</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22777"/>
		<updated>2012-10-16T19:07:30Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to log in to your SBC by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
ssh root@phidgetsbc.local&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember, if you changed the hostname of your SBC, you&#039;ll need to enter that hostname instead of &amp;quot;phidgetsbc&amp;quot;. If you prefer, and if you know what it is, you can always type in the ip address instead.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged in, the next step is to navigate to the root directory. If you&#039;re not sure how to navigate to the root directory, you can do that by typing:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we need to create a file called &amp;quot;wireless&amp;quot;. We can do this with a simple text editor such as pico.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
pico wireless&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When pico launches, you will need to copy the following lines of code.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.2&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One the code is copied, you can press &amp;quot;ctrl+o&amp;quot; to save the file and &amp;quot;ctrl+x&amp;quot; to exit pico. You may notice that we&#039;re setting a lot of the specifics of our ad-hoc network in this file. If you ever want to change any of these settings, you will need to change this file.&lt;br /&gt;
&lt;br /&gt;
When this is done, you will need to edit another file. This time, we&#039;re going to edit a file that runs every time the SBC boots up. Begin by navigating to the &amp;quot;etc&amp;quot; directory from root.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
cd /etc&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, start up pico again, but this time, by opening the file &amp;quot;rc.local&amp;quot;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
pico rc.local&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, copy this line of code right before the &amp;quot;exit 0&amp;quot; line.&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
/wireless&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you&#039;re done that, simply save the file with &amp;quot;ctrl+o&amp;quot; and exit with &amp;quot;ctrl+x&amp;quot;, like you did before. When the file has been saved, you exit out of SSH and reboot the robot.&lt;br /&gt;
&lt;br /&gt;
===We have now finished setting up the Ad-Hoc network on the SBC.===&lt;br /&gt;
&lt;br /&gt;
The next thing we&#039;re going to do is connect our Linux based computer to the SBC via our new Ad-Hoc network. If you&#039;re not using Linux, this process is a little bit different, but not by much.&lt;br /&gt;
&lt;br /&gt;
The nice thing about using Linux is that it&#039;s exactly the same process as before. The only difference is how we set up the wireless file. For your Linux based computer, the wireless file will look like this:&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
ifconfig wlan0 down&lt;br /&gt;
iwconfig wlan0 mode ad-hoc&lt;br /&gt;
iwconfig wlan0 essid &#039;test&#039;&lt;br /&gt;
iwconfig wlan0 key 1234567890&lt;br /&gt;
ifconfig wlan0 up&lt;br /&gt;
ifconfig wlan0 192.168.100.1&lt;br /&gt;
iwconfig wlan0 channel 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the only thing I have changed is the ip address.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22776</id>
		<title>Ad-Hoc Networks on the SBC</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=Ad-Hoc_Networks_on_the_SBC&amp;diff=22776"/>
		<updated>2012-10-16T18:45:16Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: Created page with &amp;quot;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&amp;#039;re probably going to be interested in setting up an ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you ever wanted to communicate with your single board computer wirelessly and without using your home network, then you&#039;re probably going to be interested in setting up an Ad-Hoc network connection. And though we currently do not have a proper interface for doing this, the entire process is relatively simple.&lt;br /&gt;
&lt;br /&gt;
In this example, I&#039;m going to show you how to communicate between a computer running a Linux based operating system, such as a laptop or desktop, and the Phidgets Single Board Computer. The first thing you&#039;ll need to do is connect to your Single Board Computer via SSH. Remember that you&#039;ll need to enable the &amp;quot;SSH Server&amp;quot; on your SBC first. &lt;br /&gt;
&lt;br /&gt;
You can do this by:&lt;br /&gt;
 * logging into the SBC&#039;s web interface&lt;br /&gt;
 * clicking on the &amp;quot;Network&amp;quot; tab&lt;br /&gt;
 * clicking on the &amp;quot;Settings&amp;quot; tab&lt;br /&gt;
 * selecting &amp;quot;enabled&amp;quot; under &amp;quot;SSH Server&amp;quot;&lt;br /&gt;
 * clicking &amp;quot;Save Changes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When that&#039;s done, you can use SSH to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;source&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22772</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22772"/>
		<updated>2012-10-15T21:01:24Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 15, 2012 - Project Complete|Mike B}}&lt;br /&gt;
&lt;br /&gt;
===Product Description===&lt;br /&gt;
In the end, what we created was a simple and functional remote control for the MURVV robot. The program runs on an Android phone or tablet and is capable of preventing multiple simultaneous accesses by placing users on a waiting list, or queue as I usually referred to it as. Administrators can bypass this queue system, remove the current user and use the robot immediately via a simple login system. In addition, robot functionality is locked within certain hours of the day to prevent users from accessing the robot outside of regular working hours.&lt;br /&gt;
&lt;br /&gt;
The program was optimized to some reasonable extent and runs at very nearly the same speed as it did before the queue system was implemented. It was also simplified to some extent, making it easier to add additional functions later on.&lt;br /&gt;
&lt;br /&gt;
===Project Summary===&lt;br /&gt;
At the beginning of this project we had simply wanted to write an Android application that we could use to move the robot around. I was given the task of writing this application and started by making a list of all the different functions I wanted the Android application to be capable of performing. As well as these functions, I also drew up a rough layout of what I wanted the application&#039;s user interface to look like. And after a series of problems, mostly caused by both my lack of experience in both using phidgets and programming Android applications, I managed to get the application working without having to make any major changes to my original plans.&lt;br /&gt;
&lt;br /&gt;
When this was all done, we decided to expand the scope of the project by making the robot easily accessible over the internet. I knew this was going to be a fairly complicated addition to the project, but I started working on it in exactly the same was as I had done before. I made of list of all the new functions I wanted the application to perform, potential problems I would encounter along the way, and a quick drawing of any new user interfaces I would have to include. And, much like before, after encountering more than few problems -mostly caused by my extreme dislike of computer networking- I managed to add all the new functions to the application.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|t9VDnc_vUpA}}&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png|thumb|file=|The Login Screen]]&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|upright=1.2|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|upright=1.2|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|upright=1.2|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|upright=1.2|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22764</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22764"/>
		<updated>2012-10-15T19:14:40Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 15, 2012 - Project Complete|Mike B}}&lt;br /&gt;
&lt;br /&gt;
===Product Description===&lt;br /&gt;
In the end, what we created was a simple and functional remote control for the MURVV robot. The program runs on an Android phone or tablet and is capable of preventing multiple simultaneous accesses by placing users on a waiting list, or queue as I usually referred to it as. Administrators can bypass this queue system, remove the current user and use the robot immediately via a simple login system. In addition, robot functionality is locked within certain hours of the day to prevent users from accessing the robot outside of regular working hours.&lt;br /&gt;
&lt;br /&gt;
The program was optimized to some reasonable extent and runs at very nearly the same speed as it did before the queue system was implemented. It was also simplified to some extent, making it easier to add additional functions later on.&lt;br /&gt;
&lt;br /&gt;
===Project Summary===&lt;br /&gt;
At the beginning of this project we had simply wanted to write an Android application that we could use to move the robot around. I was given the task of writing this application and started by making a list of all the different functions I wanted the Android application to be capable of performing. As well as these functions, I also drew up a rough layout of what I wanted the application&#039;s user interface to look like. And after a series of problems, mostly caused by both my lack of experience in both using phidgets and programming Android applications, I managed to get the application working without having to make any major changes to my original plans.&lt;br /&gt;
&lt;br /&gt;
When this was all done, we decided to expand the scope of the project by making the robot easily accessible over the internet. I knew this was going to be a fairly complicated addition to the project, but I started working on it in exactly the same was as I had done before. I made of list of all the new functions I wanted the application to perform, potential problems I would encounter along the way, and a quick drawing of any new user interfaces I would have to include. And, much like before, after encountering more than few problems -mostly caused by my extreme dislike of computer networking- I managed to add all the new functions to the application.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png|thumb|file=|The Login Screen]]&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|upright=1.2|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|upright=1.2|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|upright=1.2|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|upright=1.2|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22762</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22762"/>
		<updated>2012-10-15T18:20:38Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png|thumb|file=|The Login Screen]]&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|upright=1.2|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|upright=1.2|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|upright=1.2|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|upright=1.2|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22761</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22761"/>
		<updated>2012-10-15T18:19:11Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png|thumb|file=|The Login Screen]]&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|upright=1.2|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|upright=1.2|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|upright=1.2|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|upright=1.2|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22760</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22760"/>
		<updated>2012-10-15T18:13:23Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: Added some new pictures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png|thumb|file=|The Login Screen]]&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=File:Login.png&amp;diff=22759</id>
		<title>File:Login.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=File:Login.png&amp;diff=22759"/>
		<updated>2012-10-15T18:12:30Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22758</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22758"/>
		<updated>2012-10-15T18:11:33Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done.&lt;br /&gt;
&lt;br /&gt;
[[File:CameraControls.png|thumb|file=|The Camera Interface]]&lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=File:CameraControls.png&amp;diff=22757</id>
		<title>File:CameraControls.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=File:CameraControls.png&amp;diff=22757"/>
		<updated>2012-10-15T18:10:34Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: Mwbenedi uploaded a new version of &amp;amp;quot;File:CameraControls.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=File:CameraControls.png&amp;diff=22756</id>
		<title>File:CameraControls.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=File:CameraControls.png&amp;diff=22756"/>
		<updated>2012-10-15T18:08:44Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22722</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22722"/>
		<updated>2012-10-11T22:18:56Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t mean it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22721</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22721"/>
		<updated>2012-10-11T21:08:46Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 11, 2012 - It&#039;s the Little Things...|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Things are really moving along smoothly now. In fact, I don&#039;t even think I have anything to complain about today! &lt;br /&gt;
&lt;br /&gt;
At the beginning of the project, I created a list of the kind of functionality I wanted to have by the end of the project and most of that, as well as few other things, have been completed now. And although most of the things I completed today are relatively minor in the grand scale of things, I completed a whole bunch of these little minor things that have been on my &amp;quot;to-do&amp;quot; list for a long time.&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will try and find any remaining flaws in the program and fix them. And after that, I think this project will be considered finished... again.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Spent the day wrapping things up and preparing for major testing tomorrow.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves off bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22719</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22719"/>
		<updated>2012-10-10T20:53:15Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 10, 2012 - Chugging Away |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Everything is sure coming along nicely now! I&#039;ve been trying to &amp;quot;child-proof&amp;quot; the program as best as I can. I know the kind of audience that I&#039;m going to be targeting, and I sincerely doubt that every one of them is going to be as knowledgeable and forgiving as I am. Therefore, if I want to stop people from crying out in frustration, hurling themselves of bridges and doing other terrible things to vent their anger with my software, it is my duty to make this program as unbreakable as possible. Of course, with the infamous &amp;quot;networking problems&amp;quot; this isn&#039;t exactly the easiest thing to do. There are going to be a lot of problems that pop up that are going to take a lot of work to deal with.&lt;br /&gt;
&lt;br /&gt;
In terms of short-term goals, I&#039;ve finally got the program to properly display the user&#039;s &amp;quot;place in line&amp;quot; and I&#039;ve also got the program to function on a timer. (So that no one user can hog the robot for twenty years at a time... Don&#039;t think that can&#039;t happen. If you allow it, someone will find a way...)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program requires child-proofing!&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22718</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22718"/>
		<updated>2012-10-10T20:44:30Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
[[Category:Application Guides]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 9, 2012 - Fixing the Problems Again |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Today was a day I used to fix all the problems I created before the long weekend. As always, it was some stupid little bug that was causing all the problems. The issue was that I closed the phidget dictionary in some random function and then tried to use it afterwards. Needless to say, that doesn&#039;t work very well...&lt;br /&gt;
&lt;br /&gt;
I also spent some time getting git set up on my computer so that I can have a detailed record of all the changes I make in the future. I learned how to use the program during my last internship job, and though I really hated using it for the first couple of weeks, it has now become this thing that I just can&#039;t live without. It&#039;s extremely useful to have! If you&#039;ve never used it before, it&#039;s worth checking out. And if you&#039;ve never heard of it before, you can check it out on their [http://git-scm.com/about website]. (Because I really doubt I could do a better job of explaining the software myself...) One thing I will note, however, is that you will probably want to use git with one of the free &amp;quot;git repository websites&amp;quot; so you can store your code online. Either [https://github.com/ Github] or [https://bitbucket.org/ Bitbucket] are great options and you can read more about them on their websites.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Most of the problems I created have been fixed now. I also got a git repository set up for my code.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22703</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22703"/>
		<updated>2012-10-05T20:29:02Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 5, 2012 - Rewriting the Program |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I spent the last two days rewriting the program into something that&#039;s slightly more understandable, but as always, now it doesn&#039;t work properly any more. In fact, that parts that do work are really slow now. So now I&#039;m trying to fix all the problems and that&#039;s just creating more problems and more work. So now, I think, would be a good time to advertise the revision control system &amp;quot;git&amp;quot;, which I think I shall start using with these projects from now on. It&#039;s very frustrating when you realize that all of the work you did only made things worse and it&#039;s very nice to be able to click a button and revert everything back to the way it was. But, because of my lack of foresight, I can&#039;t do that. I don&#039;t have any older copies of the program and so my only way of fixing everything is either trying to make the new stuff work or trying to remember what I wrote down almost a week ago and revert back to the old stuff.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Always keep a record of the changes you make to your programs. You&#039;ll be thankful you did.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22702</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22702"/>
		<updated>2012-10-03T21:50:16Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 3, 2012 - Administrators |Mike B}}&lt;br /&gt;
&lt;br /&gt;
I have a lot of the standard administrator features implemented now, but the complexity of the program is only getting worse. At some point in the near future I will have to try and improve things, either by cutting out unnecessary functions or finding some way to rewrite parts of the program. It&#039;s not even a problem of making the thing more &amp;quot;object-oriented&amp;quot; as some of you may be screaming at your monitors right now. It&#039;s the problem of passing around so many complicated variables between the robot and the android users and somehow making sure that the robot is not going to crash.&lt;br /&gt;
&lt;br /&gt;
Did I ever mention how much I disliked networking problems?&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is turning into a very ugly rat&#039;s nest and I blame it on networking problems, because networking problems are evil.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 2, 2012 - Working Well |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Many of the little bugs have been worked out now and the queue works pretty well. Right now, the queue has room for up to 10 different users (including the one at the head of the queue), but after that, it&#039;s a free-for-all. That isn&#039;t to say that the eleventh, twelfth, and thirteenth users won&#039;t be able to get into the queue, at the moment, I have a work-around for that and they can still enter the queue at some point. However, who exactly gets to enter the queue is dependent upon who happens to get in line first and isn&#039;t dependent upon anything other than shear luck. Now, of course we have to ask the question: &amp;quot;Is this really a problem?&amp;quot; Quite frankly, I don&#039;t think it is a problem. As much as I&#039;d love for people to be lining up in the hundreds and thousands to use this android app, it seems very unlikely that we&#039;re going to deal with more than about three or four people at once. And that, I think, is being pretty generous...&lt;br /&gt;
&lt;br /&gt;
Tomorrow I will be working on getting some administrator controls up and running. I want to have some way to be able to boot the current user and let an administrator access the robot without navigating the queue. This could be a little tricky, because between the program on the robot and the android app, this thing is getting really complicated. I&#039;m trying my best to make it easy to understand, but at some point that&#039;s just not going to be possible to do any more. Even at this point, I don&#039;t think a regular, run-of-the-mill programmer could understand what&#039;s going on without an in-depth explanation.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The android app is working, but everything is getting exponentially more complicated and more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22670</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22670"/>
		<updated>2012-10-02T20:12:13Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Oct 1, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22669</id>
		<title>MURVV - Android Robot Controller</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs21/index.php?title=MURVV_-_Android_Robot_Controller&amp;diff=22669"/>
		<updated>2012-10-02T20:11:19Z</updated>

		<summary type="html">&lt;p&gt;Mwbenedi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Project Logs]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - More Problems |Mike B}}&lt;br /&gt;
&lt;br /&gt;
After finally cutting out enough of the inefficiency so that the robot will run properly again, I&#039;ve encountered another problem. Somehow, I&#039;ve cut out a vital part of the program and now it keeps letting all the users just &amp;quot;walk to the front of the queue&amp;quot;. Not much more to say about that. It&#039;s just another problem I need to fix.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Fixing some problems makes more problems.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 27, 2012 - Inefficiency is a Problem |Mike B}}&lt;br /&gt;
&lt;br /&gt;
As the title of this post states quite clearly, I have a serious problem. While I&#039;ve finally managed to get my program working, I&#039;m now running into an entirely new problem; namely, the robot doesn&#039;t move properly any more. The program is actually so slow now that the robot stutters instead of moving smoothly. Obviously, this is going to be a problem I&#039;ll have to fix. No one wants to use something that moves like a city bus in rush hour traffic. And, somehow, I doubt the prospect of waiting in a queue to use something that moves like a city bus in rush hour traffic is going to make it any more appealing.&lt;br /&gt;
&lt;br /&gt;
So I guess I&#039;m going to be spending the next little while trimming the fat. And to be totally honest, there&#039;s a heck of a lot of fat on this thing.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The program is now so incredibly inefficient that it doesn&#039;t run properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 25, 2012 - Multi-User Controls - The Sequel |Mike B}}&lt;br /&gt;
&lt;br /&gt;
So I&#039;ve done some more research into this &amp;quot;networking&amp;quot; problem. By now I&#039;ve established a clear understanding of what doesn&#039;t work. Specifically, Android does not have any clear ways of terminating a program, so I can&#039;t run my queue the way I wanted to. Instead of simply sending an &amp;quot;I&#039;m done using the Android Controller.&amp;quot; signal, I have to send a very long series of:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;Yes.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when the client is finally done, the signals will look more like this:&lt;br /&gt;
&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Are you still using the Android Controller?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Why aren&#039;t you talking to me?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Is it something I said?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Because if it&#039;s something I said, I&#039;m sorry! I didn&#039;t meant it!&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Hello?&amp;quot;&lt;br /&gt;
Client: &amp;quot;...&amp;quot;&lt;br /&gt;
Server: &amp;quot;Forget you, Client! I&#039;m going to see someone else! &#039;&#039;&#039;Someone better!!!&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NewClient: &amp;quot;Hey! I want to use the Android Controller.&amp;quot;&lt;br /&gt;
Server: &amp;quot;OK, great! Here you go! You&#039;re like, soooo much better than the last guy. By the way, are you still using the Android Controller?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In simpler terms, my current networking protocol acts like a flaky, overly-dramatic teenage girl. This is why I don&#039;t like networking problems. The answer always seems so incredibly inefficient. But this seems like the only feasible way of ensuring two main points: First, that the server recognizes when the client is connected, and second, that the server recognizes when the client has left, regardless of exactly &#039;&#039;&#039;HOW&#039;&#039;&#039; the client left. (Whether it was by voluntary termination or otherwise.)&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
My original networking protocol didn&#039;t work properly and I had to resort to using something much more inefficient and annoying.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 24, 2012 - Multi-User Controls |Mike B}}&lt;br /&gt;
&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it. This will allow multiple users to login to the robot without interfering with each other.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken a bunch of notes about the idea, but I think this will end up being almost entirely a &amp;quot;networking&amp;quot; problem. Ah, good old networking problems... I hate them almost as much as that casserole stain in the back of my fridge. You can&#039;t ignore it and you can&#039;t clean it up properly; the best you can do is try and &amp;quot;deal with it&amp;quot; in the most efficient way possible. In my fridge, I decided to cover up the stain with a jar of mayonnaise. But I can&#039;t cover up the networking problems in the Android Controller with a jar of mayonnaise so instead I&#039;m going to use a series of handshakes and periodic acknowledgements to maintain a queue. I plan on working out the finer details tomorrow. And by then, I&#039;ll let you know exactly what&#039;s going on.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Now that the Android Controller works the way we want it to, I&#039;m going to write a queueing program for it.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 13, 2012 - Completed! (Well, pretty much anyway...)|Mike B}}&lt;br /&gt;
&lt;br /&gt;
One day over a week and it&#039;s finally done. Well, not completely, there&#039;s always more things I could do to improve it, but like everyone else who&#039;s ever written software before, you know there comes a point when you just say it&#039;s finished, even if it&#039;s not really done. &lt;br /&gt;
&lt;br /&gt;
Bright and early in the morning today I moved the robot around in a circle and drove it up and down the hallway. That was pretty cool. When you spend a long time on something it&#039;s nice to see it all come together the way you wanted it to. And it&#039;s even better when things start to move along as quickly as they did. It seems like only yesterday I was first getting it to move... Well, maybe that&#039;s because it was yesterday. It&#039;s all a learning process, I know that, and the more you learn the easy things become, but I have to admit, as a first time user of these phidget things, the learning curve isn&#039;t very steep. Admittedly, there&#039;s a bit of a jump between when you first start and when you actually connect to the devices and get them to do anything, but it is surprisingly easy to make progress after that. And if we improve the Android section of the wiki and fix all the problems I ran into, it should be a reasonably simple task to get started.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
It took me a little over a week of work, but the project is essentially done. If you&#039;re sceptical about using phidgets for a project you&#039;re working on because you think they&#039;ll be too hard to learn, don&#039;t be. As the new intern at the company and a first time user, I found it surprisingly easy to learn.&lt;br /&gt;
&lt;br /&gt;
===UPDATE===&lt;br /&gt;
I can&#039;t believe I forgot about this, but I haven&#039;t implemented the camera controls yet. That&#039;s something I definitely need to do to wrap this project up, as it&#039;s fairly important to be able to control the camera as well as the actual robot.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 12, 2012 - First Movement|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So it&#039;s been one full week since I started on this project and today was the first day I actually got the robot to do anything. It was quite the experience when I booted up the app this morning and pressed forward to see the robot slowly crash into the table down the hall. It was an equally satisfying and terrifying thing to watch through the webcam. Half of me was thinking “Uh oh... Stop it! It&#039;s going to crash you lunatic!” and the other half was thinking “Hahaha! It&#039;s alive! It&#039;s aliiiiive!” Well anyway, it did manage to stop before it broke anything...&lt;br /&gt;
&lt;br /&gt;
[[File:Android Robot Controller.png|thumb|file=|The Android Robot Controller interface]]&lt;br /&gt;
&lt;br /&gt;
It still needs a little more work, but I&#039;ve got enough done that I can actually move the robot around now and that&#039;s a pretty good feeling. However, I still don&#039;t really know anything about the software that&#039;s running on that strange metal box. At the current moment, we have to start up some software on the robot itself before we can connect to it. Ideally, it would be nice to be able to start the thing thing up at the same time as the android app. That way we wouldn&#039;t have to worry about whether or not the robot is actually on. Both things would boot up concurrently and it would make it a lot easier to deal with. But is that too  hard? too impractical? even possible? I don&#039;t know.&lt;br /&gt;
&lt;br /&gt;
In the end. I guess what I really want to do with this thing is make it really easy to use. Right now, they&#039;ve got some kind of joystick strapped to a piece of 2x4 and you have to connect to a bizarre computer interface that doesn&#039;t even seem to work on my computer. Is it because I&#039;m using Linux and they&#039;re using Windows? Maybe... Or is it because I just have absolutely no clue how that program works? That seems more likely. &lt;br /&gt;
&lt;br /&gt;
Now, with the android app I&#039;ve almost completed, you&#039;ll just be able to start up the app and see everything from the get go. The webcam view will be right there in front of you and the controls will be so easy to use you won&#039;t even have to think about. And that&#039;s the objective, right? If you have to take time to learn the controls to anything then the controls are probably more complicated than the need to be. (Though it realize this doesn&#039;t really apply to everything. Frankly, I&#039;d be horrified if I found out my pilot was controlling the plane form his phone. Intrigued, sure, but horrified nonetheless.)&lt;br /&gt;
&lt;br /&gt;
Anyway, this is the plan: Four buttons in each corner. In the top corners, there&#039;s one for clockwise rotation and one for counterclockwise rotation. Then there&#039;s a button in the bottom left corner that switches the controls to the camera (so you can pan/rotate/zoom the camera). The last button, in the bottom right corner shows/hides all the controls, so you can make the interface less cluttered and see more of what you&#039;re doing. The webcam feed will take up the entire screen so you can see what you&#039;re doing and there will be a little red dot in the center of the screen to make it easier for the user to know where to put his finger.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The robot actually moved today and I made more detailed plans for the user interface. Simplicity and intuition should both play a large part in the design.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 11, 2012 - C# to Java|Mike B}}&lt;br /&gt;
&lt;br /&gt;
The last two days were spent translating the existing C# code into Java code. I&#039;ve never actually written anything in C# before, so it was a bit confusing at first, but the two days I spent on it were enough time to figure out everything I needed to figure out and by the need of the second day I had all of it translated into Java so I could use it in my Android app.&lt;br /&gt;
&lt;br /&gt;
One thing that I discovered today is that this is an excellent way to learn how to use all the different phidgets. When you&#039;re translating code like this you get an opportunity to learn a bunch of different things. First, you learn how to use the language that you&#039;re translating from, in this case, I learned how to use C#. Second, you learn how to use the language you&#039;re translating to. Of course, I already knew a lot about Java, but I can&#039;t deny that I learned a little bit more about it from the experience. And lastly, you learn how to interact with the phidgets in both languages. I think this is a lot more useful than learning how to interact with the phidgets in just one language because, although you may gain a greater understanding about that one language, you actually learn how the individual functions work and what exactly they all do.&lt;br /&gt;
&lt;br /&gt;
So I really would encourage some of you to try and do this once or twice. It&#039;s definitely a difficult thing to do, but you learn so much that it&#039;s well worth the time and the effort. Just make sure you use two different languages that you actually want to learn about. There&#039;s no sense in translating from Visual Basic to Java if you hate Visual Basic and you never use Java.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Translating code from one language to another is a time-consuming, but valuable learning experience.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 7, 2012 - Complaints and a Barbecue|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Friday! and the last day of my first week here at Phidgets. &lt;br /&gt;
&lt;br /&gt;
I didn&#039;t accomplish as much as I would have liked to on the Android app, but I did read a bit more into the Android Developer site and tried to figure out how to do different things with the interface. I got some buttons to do interesting things like show and hide other buttons and I played around with the layouts a bit... But as it turns out, setting up the layouts for all the different kinds of Android devices you might use is &#039;&#039;&#039;really&#039;&#039;&#039; difficult. You inevitably have to write several different cases and use different layouts for all the different screen sizes, something I didn&#039;t ever think I would have to deal with. I guess I&#039;m just so used to the formatting tools available for web pages, like css where everything is so easy to change, that I&#039;m having a hard time believing that the layouts are so difficult to set up in Android. Perhaps it&#039;s something they need to work on or maybe I just need to learn to get used to it.&lt;br /&gt;
&lt;br /&gt;
On another note, we had a barbecue at work today, which was a nice change from the boring sandwiches I usually pack in my lunch. Lately, I&#039;ve felt like packing a lunch is something I do more because &#039;I don&#039;t want to die of starvation&#039; and less because &#039;I actually want to eat what I pack in my lunch&#039;. I don&#039;t imagine I&#039;m the only one that feels that way, but it&#039;s all the more reason I appreciated the barbecue today. &#039;&#039;&#039;However&#039;&#039;&#039;, I did have to wonder why they seemed to think &amp;quot;out back, between two dumpsters&amp;quot; was the best location to hold this event...&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
Android doesn&#039;t a very good job when it comes to developing applications for multiple devices and if you want your code to work on everything from tiny phones to big tablets, you have to be willing to write a lot of code. Also, the city of Calgary should really put a park next to my workplace.&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 6, 2012 - The Wiki|Mike B}}&lt;br /&gt;
&lt;br /&gt;
Spent most of the day today trying to get Android to work with Phidgets. It&#039;s very frustrating when things simply don&#039;t work, but I&#039;m sure each and every one of you know exactly what that&#039;s like.&lt;br /&gt;
&lt;br /&gt;
The worst of it was that none of the examples in the wiki were working! The code that the guys in the office wrote just wasn&#039;t working no matter what I tried to do. Moreover, some of the code the wiki tells you to download code that doesn&#039;t exist! Well, that&#039;s obviously something we need to work on and I suppose it&#039;s all the more reason we need to be doing more stuff like what I&#039;m doing right now. It shouldn&#039;t be a challenge to the examples to work.&lt;br /&gt;
&lt;br /&gt;
All ranting aside, I figured out what the problem was by the end of the day. As it turns out, android doesn&#039;t seem to recognize your libraries unless they&#039;re in the &amp;quot;libs&amp;quot; folder. That&#039;s right, &#039;&#039;&#039;even though the examples have the &amp;quot;phidget21.jar&amp;quot; and &amp;quot;PhidgetsUSB.jar&amp;quot; files in the root of the directory, you have to put them in the &amp;quot;libs&amp;quot; folder instead.&#039;&#039;&#039; Otherwise your app will simply crash as soon as it starts up, which is really frustrating. After I did that, all the examples worked and I even got my own application to recognize the phidgets in the robot.&lt;br /&gt;
&lt;br /&gt;
That&#039;s one step forward I guess.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
The Android section of the Phidgets wiki needs some work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Phlog| Sept 5, 2012 - The first day|Mike B}}&lt;br /&gt;
&lt;br /&gt;
So the guys in the office came up with a great idea for the robot they&#039;ve made. They want to make an Android app for it. We could put this app on a smartphone or a tablet and use that as a controller for the robot. Being the new intern here at Phidgets, I was sent to work on it almost as soon as I walked through the door. I wasn&#039;t about to complain. At my last internship, my first assignment was to read hundreds of pages of legal agreements and safety manuals. This was a lot more interesting.&lt;br /&gt;
&lt;br /&gt;
[[File:Android.jpg|thumb|file=|Android - An OS for phones and tablets.]]&lt;br /&gt;
&lt;br /&gt;
I started the day off getting together all the necessary tools for my endeavour. I&#039;ve never done any programming for Android before, so I really had no idea where to start. Thankfully, Android makes it relatively easy. They&#039;ve put together a [http://developer.android.com/training/ developer training website], as they seem to call it, with a ton of detailed instructions to help you get started. I&#039;m a staunch Linux fan-boy when it comes to any kind of programming work, so I followed the instructions for getting set up on Linux.&lt;br /&gt;
&lt;br /&gt;
The Android website recommends using Eclipse, a program I learned about, and simultaneously learned to hate, in university. It&#039;s not that it&#039;s a &#039;bad&#039; program. Eclipse can be very useful sometimes, but I&#039;ve just found it to be too bulky and awkward to deal with for most of my projects in the past, so I wasn&#039;t entirely enthusiastic about their suggestion. But, as I mentioned before, I really had no idea what I was doing at this point, so I just followed along blindly.&lt;br /&gt;
&lt;br /&gt;
One of the great things about Linux is that most of the well-known programs are notoriously easy to install. I use a distribution of Linux called &amp;quot;Linux Mint&amp;quot; and the process of installing Eclipse was as simple as typing &amp;quot;sudo apt-get install eclipse&amp;quot; into a terminal. Ten minutes later Eclipse was installed and I started up the program and frowned unhappily at the familiar, yet still loathed Eclipse environment that popped up in front of me.&lt;br /&gt;
&lt;br /&gt;
But I continued to follow along regardless and advanced on to the next step, installing the &amp;quot;Android Development Kit&amp;quot;. And though I still didn&#039;t like Eclipse, I couldn&#039;t help but smile at how easy it was to install the ADK. A point and a click later and I was done. Great, next step.&lt;br /&gt;
&lt;br /&gt;
The Android website then asks you to install updates; however, I decided that I didn&#039;t want to do that and I just went on to the next step, writing my first app. A couple of hours later, I had a very simple Android application working on both my Android emulator and my Android tablet. I was even beginning to like Eclipse. Eclipse does a wonderful job of showing you exactly what you&#039;re going to see on screen when you actually run your app. It also helps you find the right libraries and imports them all automatically. Happy with my progress, I thought it was about time to start working on the real thing.&lt;br /&gt;
&lt;br /&gt;
[[File:Eclipse Logo.png|thumb|file=|Eclipse - One of my least favourite programs.]]&lt;br /&gt;
&lt;br /&gt;
But before I went any further, it was time to update eclipse, the one step I had skipped earlier. And despite all my accomplishments today, this is where all my past eclipse experiences came flooding back to me in a torrent of nightmarish flashbacks. The Android website tells you to update eclipse, so that&#039;s what I did... Well, that&#039;s what I tried to do anyway. When I clicked on the update button, Eclipse popped up a window that showed me all the packages that needed updating. No problem, right? Just click on all of them and say OK. Well, that&#039;s not how it went down. Eclipse said, &amp;quot;No. I don&#039;t want to update.&amp;quot; and crashed. I frowned and tried it again. And again, it crashed. &amp;quot;OK&amp;quot;, I thought, &amp;quot;Let&#039;s try updating the packages one at a time instead. I&#039;ll just skip over the one that won&#039;t update.&amp;quot; Well, to my surprise, this actually worked and somehow I got all of the updates installed. &lt;br /&gt;
&lt;br /&gt;
But then everything went wrong again. Somehow the updates destroyed the entire ADK and now I couldn&#039;t get any of my android apps to work again. After trying to get everything working again and having no success, I simply reinstalled eclipse and skipped over the update step permanently. I supposed it would just be one of the quirks I would have to deal with. &lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
For the amateur Android programmer, the introduction is an &#039;almost&#039; painless process. Android&#039;s guide is well written and clear, but even they can&#039;t accommodate for the failings of programs they have no control over. So if you&#039;re new to Android, but fairly familiar with programming, you shouldn&#039;t have too much of a problem getting set up.&lt;/div&gt;</summary>
		<author><name>Mwbenedi</name></author>
	</entry>
</feed>