Start by connecting to your Intel Galileo via SSH

You can either check your router's DHCP reservation/attached devices OR run the ethernetTest.ino Arduino sketch to determine your Galileo's IP Address if you're not sure what it is.

Run ssh through terminal or putty and connect to your Galileo using

# sudo ssh root@(IpAddress)

The password will be whatever you set it as when you built your Debian Linux Distro.

Change your hostname

Run the following commands as they will change and set your hostname visible on your Network

# nano /etc/hostname

Edit hostname to GalileoGen1 (Or something distinctive keeping in mind we will be working with two Galileos)

# /etc/init.d/hostname.sh

Setting up a local server

If you haven't already, set up a local server on the Intel Galileo

# apt-get install apache2 php5 libapache2-mod-php5

This will enable us to host webpages and data given the IP address of the Galileo.

Test your server by typing (IpAddress)/index.html in your browser

For Example: 192.168.1.2/index.html And you should see a page with a header "It Works!





Navigate to /var/www

#cd /var/www

We are going to create two files here:

# touch request.txt

# nano position.php

Edit position.php using the attached "position.php" contents.

What this php file does is it receives data provided in the URL parameter and saves it in the txt file request.txt.





Test it!

In your browser, have two tabs:

(IPAddress)/position.php?position=300

and

(IPAddress)/request.txt

Play around with the parameter and reload the request.txt and observe the value change.

Host Arduino Sketch

Provided is an attachment to Host.ino which is the sketch we'll be uploading to the Intel Galileo.

The sketch updates the request.txt file using system commands if the joystick is changing position with a delay rate of half a second.

Test it again!

Navigate to (IPAddress)/request.txt, move your joystick left/right while reloading the page and watch as the data changes!

You'll see in the txt file I use 'Joystick', the data itself, and E(for end of file) so that later on the Client is able to parse the HTML document.



