Difference between revisions of "Galileo"
(→Connection Issues) |
(→Breadboard/Sensor Issues) |
||
Line 58: | Line 58: | ||
#* Is the pin mode set correctly? | #* Is the pin mode set correctly? | ||
#* Are you using the correct pin numbers? Analog or digital? | #* Are you using the correct pin numbers? Analog or digital? | ||
− | |||
− | |||
# hardware, | # hardware, | ||
#* are your pins loose? | #* are your pins loose? | ||
− | #* are you using the | + | #* are you using the right resistor for that sensor? |
#* do you actually know which cables go where? | #* do you actually know which cables go where? | ||
− | |||
# power, | # power, | ||
#* are the power and ground connected correctly? | #* are the power and ground connected correctly? | ||
− | |||
#* If your power columns are separated into multiple sections, are you bridging power as needed? | #* If your power columns are separated into multiple sections, are you bridging power as needed? | ||
− | #* If too many sensors are connected | + | #* If too many sensors are connected you might run out of power. Try unplugging power from some sensors. |
===Resetting the Galileo=== | ===Resetting the Galileo=== |
Revision as of 15:21, 12 May 2014
The Galileo is a fusion of a Linux PC running Intel's architecture and an Arduino. The purpose is to provide the benefits of a pc (connectivity, power, storage, ports) with the benefits of an Arduino (an open-platform hardware interface.)
This page is intended to express what we've learned about the Galileo. There are other resources, and google is very much your friend, but this is what knowledge we as students have learned. It is our experience. Take it as it is. No promises. Seriously, this is the only disclaimer you get. Stay out of the fire.
Contents
Getting Started Guide
You need three things to program an arduino or galileo:
- An arduino/Galileo Board
- The Arduino or Galileo development software
- A USB cable to connect the board to your computer
- Arduino
- Install instructions for the Arduino software on:
FYI: On Windows you need
Notes
NOTES!
Photos
Design Philosophy
- Test after every change. Seriously, this saves a lot of time.
- When success has been reached, do it again. Document it.
- When success has been repeated, have others do it. Spread your success.
Troubleshooting Checklist
- When doing research talk to scientists early on. Seriously, do it.
- The Galileo can be finicky. Google is your friend.
- Troubleshoot the best you can.
- If nothing else works,
- try a different piece of hardware.
- try unplugging/replugging or restarting or the equivalent.
- If you're still having trouble, ask a TA.
Connection Issues
- Are both of the LEDs on the Galileo not lighting up?
- Is the power plugged in?
- Maybe power is routed incorrectly on the breadboard. Try unplugging the power pins on the Galileo and seeing if it works.
- If working in the Arduino IDE,
- are you using Galileo's Arduino IDE?
- are you using the correct port?
- are you using the correct board?
- do you have the mini usb cable plugged in next to the Ethernet port?
- unplug/replug the USB and wait 30-60 seconds
- unplug/replug the USB and power and wait 30-60 seconds (power always gets unplugged last)
- If on Windows, and without hope, try changing the COM port of the Galileo and restarting your computer.
- If working in the Galileo terminal,
- do you have the RS232 -> 3.5mm cable plugged in next to the Ethernet port?
- are you using the correct port?
- are you using the correct username / password?
Breadboard/Sensor Issues
- software,
- Is the pin mode set correctly?
- Are you using the correct pin numbers? Analog or digital?
- hardware,
- are your pins loose?
- are you using the right resistor for that sensor?
- do you actually know which cables go where?
- power,
- are the power and ground connected correctly?
- If your power columns are separated into multiple sections, are you bridging power as needed?
- If too many sensors are connected you might run out of power. Try unplugging power from some sensors.
Resetting the Galileo
- Unplug the Galileo cables connected to your computer.
- Unplug Galileo's power.
- Replug power. Wait for the one light. (Which light?)
- Replug cables. Ensure that the device port is the same.
Info Dump
IoTkit handles ethernet transactions. It connects to a host and sends a packet with [string, val] where val is the value you wish to send. You can save information locally and push it to a server later. A watch battery can be used to preserve machine state between power-on's. [validate]
There are no packages installed on Intel's Linux distro.
There's an interface for C++ that lets you access the Arduino.
Always connect the power first.
When flashing the firmware, YOU MUST HAVE THE POWER CONNECTED. Otherwise you risk bricking the board.
There are example sketches for every sensor included in Intel's sensor kit. Where? Good question.
Costs $60+ as of 2/5/14. Purchase is currently cheapest at [Micro Center] and [Amazon].
Resources
[Technical Overview of Galileo] (written by Arduino)
[Release Notes] (supported software/hardware and bugs)
[Intel Maker forums] (forum for Galileo)
[Arduino Getting Started] (Arduino-specific)
[Arduino Reference] (good code samples)
[Arduino Playground] (good code samples)
Downloads
[Drivers]
Installation
You're impossible to please. Read the documentation from [Intel] or [Sparkfun] instead.
Research Information
These are notes and observations after research. It informs our projects, the sensors we choose, and the approaches we take.
Earthquake
- occur due to movement in tectonic plates
- only seconds of notice, 5-10 seconds
- [p waves] are much faster than [s waves] and the actual waves that cause the earthquake.
- earthquakes travel at about the same speed as data networks
- can be measured by motion (on surface or underground) and pressure (underground)
- downside of underground monitoring is 1) power and 2) transmission
- can use repeaters or solar power to solve these issues
- advantage of being underground is distance from noise (such as animals and humans) and being closer to the source of the earthquake
- being attached to rock is good
- downside of underground monitoring is 1) power and 2) transmission
Resources
Tsunami
- in the deep sea pressure sensors are used to measure the relatively small sea-level change (in centimeters)
- nearer to shore, where waves start to form, altitude could be measured by buoy
- travel at hundreds of miles per hour
- tsunami headquarters in Hawaii
- notification could be minutes to hours in advance depending on distance from source of tsunami
- height/speed of wave reduces with distance
Code
Pins
You must specify which pin you're using to read/write to the Galileo. Declare variables for each of the pins you're using at the top of your code. It'll make life simpler.
For example use,
- const int pin_temp = A0;
- const int pin_tilt = 4;
to give your pin a useful name and to make the pin number easier to change.
Analog vs Digital
Analog pins return a range of values between 0-255, or rather 8 bits. In order to reference an analog pin you must place an "A" in front of it, like A0 above. If your sensor needs a range of values then you must use analog pins. In addition, if necessary analog pins can be used as digital pins.
Digital pins return either 0 or 1. They can be referenced by number. Digital pins can not be used as analog pins.
Setting PinMode
The pinmode ensures that you only read/write from a pin. It helps prevent bugs.
for input use,
- pinMode(pin, INPUT);
for output use,
- pinMode(pin, OUTPUT);
Read vs Write
Self explanatory.
- for analog,
- analogRead(pin)
- analogWrite(pin, value)
- for digital,
- digitalRead(pin)
- digitalWrite(pin, value)
Printing to the Serial Interface
- set serial baud rate in setup using,
- Serial.begin(9600);
- write using,
- Serial.print(str);
- Serial.println(str);
Specs
- 400mhz cpu
- 256mb ram
- max of 32gb micro sd
- 10/100 ethernet
- PCI Express mini-card with up to PCIe 2.0
- USB host and client
- 5v/3.3v power
- same Arduino pin layout