Willie Stehm 2nd Quarter

From WLCS

Ten Goals for Second Quarter

1) Research Wiimote [X]

2) Research Wiimote head tracking [X]

3) Build head tracking unit capable of carrying out desired functions [X]

4) Implement head tracking unit [X]

5) Enable Wiimote to be used as a computer mouse [X]

6) Build a functioning web server [X]

7) Implement DNS for my server [X]

8) Research Website Development [X]

9) HTML Background, Basics, and Tutorials [X]

10) PHP Background, Basics, and Tutorials [X]

Second Quarter Goal Documentation

1) Research Wiimote

  • The Nintendo Wiimote is shipped with every single console sold and users have the option of buying up to four Wiimotes to use with their system. The Wiimote itself is a white, plastic, hand held controller that contains an infrared camera running at a resolution of 1024x768. It has the ability to track up to four infrared points simultaneously and also contains a three axis accelerometer. The accelerometer is capable of reading user movements on the x, y, and z planes at a measurement of +/- 3g's. Finally the Wiimote contains a bluetooth module that it uses to wirelessly interact with the console or any other bluetooth compatible device. For us it is very important that the Wiimote has this bluetooth module as it allows us to configure a computer with a bluetooth dongle and allow the two to freely interact.

2) Research Wiimote head tracking

  • By using an array of Infrared LED lights attached to some sort of head mounted device, the infrared camera inside the Wiimote is able to pick up the photon emissions and translate them into movement. The Wiimote is able read the photon emissions on the x, y, and z planes all determined by how the wearer of the head tracking unit moves. The Wiimote then communicates with a computer via its internal Bluetooth module to relay these movements to a Bluetooth compatible computer and allow the user to interpret them or incorporate them into a program however they see fit. In our case we will be building our own head tracking unit to emit infrared photons that the Wiimote can interpret. These movements will then be sent to the Bluetooth dongle and used with the program Desktop VR.

3) Building head tracking unit

  • To build our head tracking unit we obtained a pair of shop safety glasses from Mr.Avondet. We chose to use ones that were larger than necessary to give us extra surface area to attach the needed components (IR LEDs, battery holder, wiring).
Our Head tracking unit.
The Wiimote test lab.

To avoid the hassle of having to incorporate resistors into our circuit we opted to wire each LED in it's own circuit containing a single AA battery to power it. The first time that we soldered the wiring in place we made a big mistake. We soldered the cathode to the positive side of the battery holder and the anode to the negative end. This was based off of our chemistry knowledge where the cathode is an electrode through which positive electric current flows out of. But in the world of diodes it is the complete opposite. The cathode is the negative terminal where current flows out of the device. After a quick rewire the IR LED's were up and functioning as desired. The next step was mounting the two circuits on the pair of safety glasses. Our initial thought was to hot glue the two onto the safety glasses as to avoid any shifting that might occur. Once we inspected the glasses this idea was quickly thrown away. The glasses are made of a clear transparent plastic / rubber that would surely melt under the heat of the hot glue. We settled on a quick and easy method of using masking tape to efficiently hold all the components into place. The end result is pictured to the left and works just as desired.

4) Implement head tracking unit

DesktopVR showing the wiimote targeting system.
  • Once our head tracking unit was up and functioning properly it was time to actually put it to use. To implement it we configured a computer (shown as our Wii test lab above) to connect via bluetooth to the wiimote using the program bluesoleil. From there the wiimote was mounted on the top of the monitor using two pieces of sticky velcro. After we mounted the wiimote we settled on using DesktopVR to test our unit. The only thing we had to do was edit the configuration file to include the size of our sensor bar (the distance between the two IR LEDs on our unit) and the height of the monitor in centimeters. Once these variables were accounted for DesktopVR was able to interpret the movement of the IR LEDs on our unit via the wiimote sensors and then display that movement on a virtual targeting system shown to the right. This worked perfectly! The wiimote connected via bluesoleil without a hitch, it picked up and detected the IR LED movement, and DesktopVR accurately depicted this movement on the targeting program. The headset was fully capable of producing IR photons that were detectable up to about 10 feet. Any further than that and the wiimote struggled to pick up the IR photons which would produce erratic motions in the DesktopVR program.

5) Enable Wiimote to be used as a computer mouse

Screen shot of WiinRemote in action.
  • After testing the head tracking unit in its normal configuration we decided to move on and try to allow the wiimote to be used as a wireless computer mouse. To do this we essentially configured the set up in reverse. The IR head tracking unit was placed on top of the computer monitor while the wiimote was held in your hand to direct the cursor. The wiimote then tracks the IR LEDs as two different points and converts their movement into cursor movement via the program WiinRemote. As the user were to move the wiimote up or down, the IR LEDs then move up or down relative to the wiimote. The same thing goes for left to right movement. WiinRemote shown left, also has the ability to by pass the Infrared sensor on the wiimote and use only the accelerometer to plot cursor movement. To do this the wiimote reads movement from the x, y, and z axis and translates it into cursor movement. When comparing the two configurations, the feature that utilized the IR LEDs seemed to function more smoothly versus the one using the accelerometer. The accelerometer proved jerky which made it hard to select certain icons and fields. Because of this when testing we usually stuck to using the IR LEDs for better targeting accuracy.



6) Build a functioning web server

Server up and working properly.
  • My family recently bought a new desktop to replace our old one. This left the old computer unused and gathering dust in our office. One day during winter break I came across an article about making your own dedicated web server. It sounded interesting and I already had all the necessary components so I took it upon my self to complete it as my winter break project. To start I downloaded the server edition of ubuntu. This edition boasts a slim all command line interface that can function as a DNS server, LAMP server, mail server, openSSH server, SQL database, print server, and samba file server. I chose only to configure my server as a LAMP (standing for Linux, Apache, MySQL, PHP) server and an openSSH server. This way I will be able to host websites that I create and also access the server remotely. Installing the base system and configuring the LAMP and openSSH servers was the easy part compared to the rest. In order to have my server accessible to the outside world I had to forward ports 80 (HTTP) and 22 (SSH) on my home network to my server. Normally this would be an easy task but my home network contains ten computers, (three connecting wirelessly and seven cabled) an Xbox 360, and a Wii configured using DHCP for ease of use. In order to port forward I had to convert my entire network to static IPs' to ensure that each time someone from the outside world tired to connect to my server that my network would point them to the correct computer. After about six hours over two days I had the server set up and configured with the simple message displayed to the right to show that it was functioning correctly.

7) Implement DNS for my server

  • After I finished building my web server every time I wanted to access it I had to type my public IP address into the address bar. While this doesn't seem that bad it proved annoying to have to memorize the ten digit number to access the server. Also when I wanted to show others that it was up and functioning properly it was annoying for them to have to use my IP address versus a domain name. So under the advisement of Mr.Bui I created a account at DynDNS so I would be able to assign a domain name to my server. After going through the initial sign up DynDNS proved extremely easy to use. I choose my new domain name from a given list, entered my public IP address and it was done...or so I thought. After finishing all of this I shut down my computer and headed to bed. The next morning when I booted back up to continue work the domain name couldn't access my server. Through a bit of looking around and testing different things I found that my problem lied with my ISP and router. While my entire home network was set up as static with each computer has its own permanent IP address, my router was receiving the public IP address dynamically from my ISP. So each time I shut down and rebooted I ran the possibility of receiving a new public IP address. Once again through DynDNS I couldn't have found a simpler answer. I switched my domain name over to a DDNS (also known as a dynamic DNS) and programed my DynDNS log on information into my router. Now every time my ISP assigns my router a new public IP address, my router logs onto my DynDNS account and updates the public IP address of my server so my domain name always points users to the correct location.

8) Research Website Development

  • Since my new web server is up and functioning properly, my next goal is to research web development, learn html and php, and design a website that I can host on my web server. As I've had little to no prior experience creating websites I'm going to start by finding html and php tutorials to learn the two languages. My ideal final goal would be to have a web server that can host a website that is capable of:
  • Having a blog section
  • Hosting pictures and albums
  • Allowing users to submit comments
  • Just like annoying powerpoint presentations, the best way to figure out how to create a good functioning, aesthetically pleasing, and easy to use web page is often to observe good and bad web pages and through your own user feedback see what works and what doesn't. After a bit of searching around different web pages I compiled a list of factors that I have found key to creating and developing a good web page.
  • The Good
  • Navigation through the web page is simple and easy to use. All pages are easily accessible and proves no difficulty for the end user to surf through. Menus could be placed at the side or top of the page to provide one click access to key components of the web page.
  • Websites that function the same no matter what browser the visitor is using. Theres nothing worse than having a web page be distorted by different browsers due to the way it was designed.
  • Aesthetically pleasing - this is a big one. When websites are designed with visual appearance in mind they often function and flow much better than a website that isn't. This factor also starts to play into the navigation factor listed above.
  • The Bad
  • Horrible text effects (mocking those of the morning announcements) that render the website virtually unreadable and thus useless to the end user.
  • Wall of text format - the website provides little to no room for visuals and leaves the overall appearance very aesthetically unpleasing. Little to no punctuation is often used in this format causing normal readers to struggle with comprehending the meaning of sentences.
  • Over use of visual aides - the use of visual aides to help advance a point can often be a great thing, but when a website over does it it often takes away from the overall message as they draw the visitors attention to them rather than the text.

9) HTML Background, Basics, and Tutorials

  • HTML Background
  • Standing for HyperText Markup Language HTML was first proposed in the early 1980's as a system for researchers to use, share, and publish documents over the internet. After years of debate on the protocol the first version was finally settled upon in 1991. Today the current version of the markup language is HTML5 as of January 2008. Essentially an HTML document is a set of tags used to describe a web page. The purpose of web browsers such as Internet Explorer, Mozilla Firefox, Opera, and Google Chrome is to interpret these tags and display them to the user as a visual web page. HTML provides most of the backbone for websites today. From there designers often add in or embed other code into HTML scripts such as php and javascript to enhance the functionality of their website.
  • HTML Basics
  • Since HTML is designed as a set of tags, each tag has a start tag and an end tag to denote when each attribute starts and ends. An example of an HTML script is below
<html>

<body>
<h1> HTML SCRIPT!!!</h1>
<p> This is a new paragraph in a HTML script</p>
</body>

</html>
  • As you can see tags such as "html", "body", "h1", and "p" are all started by placing them in angled brackets. "html" is the tag that is used to start a HTML script and without it a browser such as Firefox would not know where to start interpreting the script. "body" is the tag that denotes the beginning of the visible page content. "h1" starts a new heading such as a title for the page or a paragraph. By increasing the number next to h, such as "h2" or "h3" the heading gradually gets smaller to accommodate the designers needs. As seen in the text of my mock HTML script "p" denotes the start of a new paragraph. Finally all of these are then ended by enclosing the tag in normal angled brackets but adding a back slash before the name of the tag; Ex. "/body". If the designer forgets to end a tag, the attributes of that tag will continue to effect everything proceeding that tag up until the end of the script.
  • HTML Tutorials

10) PHP Background, Basics, and Tutorials

  • PHP Background
  • Created in 1995 by Rasmus Lerdorf to present web designers with a useful set of tools to add functionality to their web pages and create dynamic websites, PHP originally stood for Personal Home Page. As PHP became more popular and commonly used, the PHP Group took over development to further the scripting language. Today PHP is embedded into the code of almost every HTML website and people use it all the time without even being aware. PHP itself is a server side scripting language meaning that everything is interpreted by the browser before it reaches the client (also known as the client side). Because of this one of the requirements for running PHP is that you have a server that has PHP already installed on it. Since during the set up process of my ubuntu server I already installed PHP, I should have no problem at all embedding PHP script into my web pages and hosting them on my server.
  • PHP Basics
  • Like HTML PHP uses sets of tags to denote when attributes start and end. The only difference is the way that the two do it. To show these differences I will take the previous HTML script example and embed a PHP script in it.
<html>

<body>
<h1> HTML SCRIPT!!!</h1>
<p> This is a new paragraph in a HTML script</p>
<?php echo "FIRST PHP SCRIPT!!!!"; ?>
</body>

</html>
  • As you can see from the script, just like HTML, PHP has start and end tags, their just formatted a little different. In HTML a tag always starts with it enclosed in angled brackets. Once you are done with that attribute you end it by again enclosing that tag in angled brackets but this time adding a back slash; EX. </...>. In PHP this is simplified and all contained in one line. To start the PHP attribute you always start with <?php and to end the attribute you just do ?>. While the "php" after the first question mark is not necessary, not including it is called using short tags and looked upon as improper coding etiquette.
  • PHP Tutorials