Outils pour utilisateurs

Outils du site


wiki:tutoriels:intel_galileo_webserver
  • *Galileo Gen2 Web server Within this part of the Galileo Gen 2 tutorial, we will explore some of the basic protocols used to transmit information from the Galileo Gen 2 to an IP address that can be recovered via a web browser. We will start with the most basic example: *Using the WebServer example from Arduino IDE Secondly, we will try and create a static page: * using Lighttpd Lastly, and the most complex (for Newbie's and Arduino users): *We will download the Intel XDK IDE. We will look at some of the examples online and try to transmit some data using Node.js Arduino Webserver Example <note> Any user who wishes to use this method should FIRST follow the instructions within the previous section to run the “getip” arduino script. This will require booting the Galileo with the SD image of linux (Yocto Poky 3.3.4). NOTE THE IP ADDRESS </note> We will assume that the user has already noted their IP address for their Galileo Gen 2 using the “getip” script OR any other method. We will start with the Galileo Gen 2 now unplugged from it's powersupply & USB port. NOTE Always unplug the Power Supply last. DO NOT run your Galileo using just the USB port. *Open the Arduino IDE >file>examples>ethernet>WebServer *Open a web browser of your choice and type your IP address in the search bar * We will see that the site does not exist *Within the WebServer example: * Type your IP address into the script where it is highlighed above * Make sure to use “,” (commas) between digits * Look on the sticker of your Ethernet cable of your Galileo Gen 2 * We must have the MAC number * It is a 12 digit code * Make sure to place each two-digits in quotations within and seperated by commas. * NOTE Look closely at the format in the photo above * Verify that the EthernetServer is within port 80 * The galileo has a IPconfig which prohibits html to be transmitted on other ports (we can later change this) Setting up the Galileo Gen 2 <note> For this example, the Galileo Must boot from the integrated linux image. In other words, we can not run this example with the SD card image *Remove the SD card from the Galileo *Plug in the Power Supply *Wait 1-2 minutes for the Galileo to boot up *Plug in an ethernet cable into your PC *Plug the ethernet cable into the Galileo *Connect the USB cable to the galileo </note> * Do not forget to change the COM# if you had just previously used the SD Linux image to run “getip” *Transfer the Arduino Script to the Galileo Gen 2 *Open The Serial Monitor (do no type anything in the serial monitor to transmit to the Galileo) This will crash the communication *refresh the web browser with the IP address of your Galileo Gen 2 We can take just a basic jumper cable and plug one end into the 3.3v output on the Arduino Side of the card and plug it into the different Analog Pins and we will observe a change in all of the values. We will now see that we are transmitting the status of the Analog Pins 1-6 of the Arduino. We can easily image that these values can be the outputs of any form of sensor. Arduino WebServer Conclusion**

This is perhaps the easiest way to jump-start a WebServer project with the Galileio Gen 2. However, we may find ourselves quickly limited with the presentation of the data streaming to the IP address. In order to We can run the WebClient Example just as easily and we will find that we can also transmit from the PC to the Galileo to pilot the Input/Output pins.

Go Home

wiki/tutoriels/intel_galileo_webserver.txt · Dernière modification: 2020/10/05 16:39 (modification externe)