Intel Galileo and Intel Galileo Gen 2 : API Features and Arduino Projects for Linux Programmers.
Main Author: | |
---|---|
Format: | eBook |
Language: | English |
Published: |
Berkeley, CA :
Apress L. P.,
2014.
|
Edition: | 1st ed. |
Subjects: | |
Online Access: | Click to View |
Table of Contents:
- Intro
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewers
- Acknowledgments
- Introduction
- Chapter 1: Intel Galileo and Intel Galileo Gen 2
- The Beginnings
- About this Book
- Why Use Intel Galileo Boards?
- The Software Advantages
- The Hardware Advantages
- Hardware Overview
- The Processor: Intel Quark SoC X1000
- Introducing Intel Galileo
- Arduino Headers on Intel Galileo
- Fourteen Digital Input/Output Pins (IO2 to IO13, TX, and RX)
- I2C Bus Controlled by the SCL and SDA Pins
- AREF Is Unused
- Analog Input Pins (A0-A5)
- Power Pins
- Sink and Source Currents in Outputs
- Jumpers and Buttons on Intel Galileo
- IOREF Jumper
- VIN Jumper
- I2C Address Jumper
- Reset Button
- Reboot Button
- Connection Diagram and Schematics
- Intel Galileo GPIO Mappings
- Introducing Intel Galileo Gen 2
- What's New in Intel Galileo Gen 2
- Arduino Headers on Intel Galileo Gen 2
- Jumpers and Buttons on Intel Galileo Gen 2
- Connection Diagram and Schematics
- Intel Galileo Gen 2 GPIO Mappings
- Preparing Your Cables
- The Serial Cable for Intel Galileo
- The Serial Cable for Intel Galileo Gen 2
- Testing the Serial Cables
- Windows
- Ubuntu Linux
- Mac OSX
- Exploring the Linux Console
- Testing the Data Cables
- Summary
- Chapter 2: Native Development
- Introduction to the Yocto Build System
- Yocto and this Book
- Poky
- The Build System Tree at a Glance
- An Example of a Recipe (.bb)
- An Example of a Configuration File (.conf)
- An Example of a Class File (.bbclass)
- Creating Your Own Intel Galileo Images
- Preparing Your Computer
- The SPI vs. SD Card Images
- Building Intel Galileo Images
- Building and Using the Cross-Compiler Toolchain
- Compiling the Toolchain for Different Architectures
- Building the Toolchains
- Linux
- OSX
- Windows.
- The Output Files
- Installing the Cross-Compilers
- Creating a Hello World!
- Debugging Native Applications
- Booting Intel Galileo with Your Own Images
- Booting from SD Card Images
- Preparing the Micro SD Card
- Windows
- Mac OSX
- Ubuntu
- Copying Files to a Micro SD Card
- Booting from SPI Card Images
- Creating the Capsule Files Flash Files
- Compiling the UEFI Firmware
- Preparing the Environment
- Compiling the Firmware
- Troubleshooting Compiling the Firmware
- Preparing layout. conf
- Using the SPI Tool
- Flashing the Capsule Files
- Flashing the Capsule File with the Intel Arduino IDE
- Flashing the Capsule File with a Linux Terminal Shell
- Flashing the Capsule File with a UEFI Shell
- Flashing the Capsule File with the Firmware Update Tool
- Creating SPI Images Flash Files
- Flashing Using an SPI Flash Programmer
- What to Do If Intel Galileo Bricks
- Summary
- Chapter 3: Arduino IDE and Wiring Language
- A Little Bit of History
- The Intel Makers Community
- Installing the Arduino IDE for Intel Galileo
- Connecting Intel Galileo
- Installing the Drivers and the Arduino IDE
- Installing the Arduino IDE
- Installing the IDE on Windows
- Installing the IDE on Linux
- Installing the IDE on MacOS
- Installing the Drivers
- The Common Step to Install the Driver
- Installing the Driver on Windows
- Installing the Driver on Linux
- Installing the Driver on MacOS
- Understanding the Arduino IDE
- Checking the Port and Board Selected
- What Is a Sketch ?
- Compiling and Running the Sketch
- Persisted and Not Persisted Sketches
- Persisted Sketches and Long Time to Start
- Debugging with Serial Console and Serial Communication
- Serial.begin(int speed)
- Serial.print(data)
- Serial.println(data)
- Serial.available( )
- Serial.read( )
- Printing Debug Messages and Using the Serial Console.
- Understanding the serialtest.ino Code
- The Arduino Language Reference and APIs
- Structure
- setup( )
- loop( )
- Digital I/O
- pinMode (int pin, int mode)
- digitalWrite (int pin, int state)
- int digitalRead (int pin)
- Analog I/O
- int analogRead (int pin)
- analogWrite (int pin, int value)-PWM
- Time
- long millis( )
- long micros( )
- delay(int milliseconds)
- delayMicroseconds(int microseconds)
- Running Some Examples
- Fade Example
- Fade Materials list
- Fade Schematics
- Fade Code
- Running the Fade Sketch
- Button Example
- Button Materials List
- Button Schematics
- Button Code
- Running the Button Sketch
- ReadAnalogVoltage Example
- ReadAnalogVoltage Materials List
- ReadAnalogVoltage Schematics
- The ReadAnalogVoltage Code
- Running the ReadAnalogVoltage Sketch
- The Debounce Example
- Debounce Materials List
- Debounce Schematics
- Debounce Code
- Running the Debounce Sketch
- Updating the Firmware Using the IDE
- Updating the Firmware with Different Firmware
- Troubleshooting the Drivers
- Serial Communication Issues with IDE on Windows
- IDE Problems with Virtual Machines and 64-Bit Linux
- Warning Messages with 64-Bit Linux
- Problems with VMware
- Problems with Oracle Virtual Box
- Communicating Sketches with Linux Native Programs
- is.Additionalfuture Project Example: Unread Email Alarm with Python and POSIX Functions
- Materials List
- The Schematics
- The PythonP Code
- Preparing the Project to Run
- Running the Code
- Reviewing the Code
- Summary
- Chapter 4: New APIs and Hacks
- Servo API
- The Theory versus Practice
- Schematic for Servo: One Servo
- The Mistake with Intel Galileo and Servos
- What Is New in Servo API?
- void Servo::set48hz( )
- void Servo::set188hz( )
- uint8_t Servo::attach(int16_t pin, bool force48hz = false).
- uint8_t Servo::attach(int pin, int min, int max, bool force48hz = false)
- Schematic for Servo: Two Servos
- Testing the New Servo APIs
- Reviewing servo_set_freq.ino
- Challenges with Servos
- Serial, Serial1, and Serial2 Objects
- Testing the Serial, Serial1, and Serial2 Objects
- Materials List
- Schematic for the Serial Example
- Reviewing all_serials.ino
- Improving the I/O Speed
- The New APIs for I/O
- Memory-Mapped and Port-Mapped I/O
- Memory-Mapped I/ O
- Port-Mapped I/ O
- The I/O Distribution
- OUTPUT_FAST and INPUT_FAST
- OUTPUT_FAST - 470KHz
- Reviewing the Code
- INPUT_FAST
- Reviewing the Code
- The Fast I/O Macros
- fastGpioDigitalWrite(GPIO_FAST_IOx, unsigned int value) - 652KHz to 684KHz
- Reviewing 684khz.ino
- Frequency Reduction with fastGpioDigitalWrite()
- int fastGpioDigitalRead(GPIO_FAST_IOx)
- Reviewing fastGpioDigitalRead_example. ino
- Reviewing latch_example.ino
- fastGpioDigitalRegWriteUnsafe (GPIO_FAST_IOx, unsigned int value) - 2.94MHz
- Reviewing running_at_2_93Mh.ino
- North-Cluster (1.12MHz) versus South-Cluster (2.93MHz)
- Keeping the Same Frequency on All Pins
- Reviewing running_at_2_93Mhz_three_pins.ino
- When Pins from North-Cluster and South- Cluster Are Used in Same Sketch
- Reviewing mixing_north_and_south_clusters.ino
- When Port Speed Is Not Enough - pinMode( ) Limitations
- The Tone API
- What's New in the Tone API?
- void tone (unsigned int pin, unsigned int frequency, unsigned long duration = 0)
- void noTone (uint8_t pin)
- A Sample Running Non-Blocking Tone Calls
- Reviewing Tone.ino
- The pulseIn API
- unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000)
- What's New with pulseIn()
- A Sample Running pulseIn()
- Reviewing pulseIn.ino
- Hacks
- Hacking the Servo Library
- Hacking the GPIO Expander for New PWM Frequencies.
- Changing the Frequency
- Selecting the Clock Source
- Selecting the Duty Cycle
- Setting the Period Register
- Changing the PWM
- Single Code for Intel Galileo and Intel Galileo Gen 2
- Project: DHT Sensor Library with Fast I/O APIs
- Materials List
- The DHT Sensor
- A Workaround Using Tri-State Buffers
- Creating a New Library for DHT11 Sensor
- The Problem with Public DHT Libraries
- Designing a New DHT Library
- Reviewing the DHT_4_Galileo.cpp Library
- Creating the Sketch for DHT Sensor
- Running the Code
- Replacing the Tri-State Buffer with a Diode
- Summary
- Chapter 5: Networking and Hacks
- WiFi Cards
- Setting Up the WiFi Mini-PCIe Card
- Checking if the WiFi Card Was Recognized
- Adding Support to a New WiFi Card
- The WiFi API
- Scanning the Wireless Networks
- Reviewing ScanNetworks.ino
- Connecting to the WPA or WEB
- Reviewing ConnectWithWPA.ino and ConnectWithWEP.ino
- Hacking the WiFi Library
- Step 1: Setting Up the WiFi Connection
- Persisted Connection with WPA
- Persisted Connection with WEP
- Step 2: Restart the Wireless Connection
- Step 3: Hacking the WiFi Class
- Ethernet API
- What's New with Ethernet API and Intel Galileo
- Ethernet Example: Network Time Protocol (NTP)
- Reviewing WiFiUdpNtpClient. ino
- Dynamic and Static IP Using Ethernet
- Dynamic IP ( DHCP)
- Configuring Intel Galileo for Dynamic IP
- Testing Intel Galileo with a Router Using DHCP
- Static IPs
- Configuring on Windows 7
- Configuring on Ubuntu 12.04
- A Common Problem with Ubuntu and Multiple Adapters
- Configuring on MacOSX 10.0
- Configuring Intel Galileo for Static IP
- Programming the IP with Intel Galileo's Linux Console
- Persisting the Static Configuration
- Configuring the IP via Sketch
- Simplifying the Sketches by Removing the Ethernet Objects.
- Transferring Files Between Intel Galileo and Computers.