Book Image

Intel Galileo Blueprints

By : Marco Schwartz
Book Image

Intel Galileo Blueprints

By: Marco Schwartz

Overview of this book

Table of Contents (19 chapters)
Intel Galileo Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Setting Up the Galileo Board and the Development Environment
Index

Testing the Wi-Fi connection


Now that we have finished setting up both modules, we'll proceed to testing them. Let's start with the LED board. If you want to learn more about Arduino first, I recommend this tutorial on the official Arduino website:

http://www.arduino.cc/en/Tutorial/HomePage

Open the Arduino IDE to start the test. Here is the complete code for this part:

// Variables & functions
#define NUMBER_VARIABLES 2
#define NUMBER_FUNCTIONS 0

// Import required libraries
#include <Adafruit_CC3000.h>
#include <SPI.h>
#include <CC3000_MDNS.h>
#include <aREST.h>
#include <avr/wdt.h>

// DHT 11 sensor
#define DHTPIN 7
#define DHTTYPE DHT11

// These are the pins for the CC3000 chip if you are using a breakout board
#define ADAFRUIT_CC3000_IRQ   3
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10

// Create CC3000 instance
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT);

// Create aREST...