Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
1. Introduction
Arduino and Pi
Raspberry Pi
Arduino
Choosing a Device: Arduino or Pi?
Alternatives
Summary
2. Arduino
What Is an Arduino?
Installing the Arduino IDE
Uploading a Sketch
The Book Code
Programming Guide
Setup and Loop
Variables
Digital Outputs
Digital Inputs
Analog Inputs
Analog Outputs
If/Else
Loops
Functions
Summary
3. Raspberry Pi
What Is a Raspberry Pi?
Setting Up Your Raspberry Pi
Preparing a MicroSD Card with NOOBS
Setting Up SSH
SSH on a Windows Computer
SSH on Mac or Linux
The Linux Command Line
The Book Code
Programming Guide
Hello, World
Tabs and Indents
Variables
if, while, etc.
The RPi.GPIO Library
The GPIO Header
Digital Outputs
Digital Inputs
Analog Outputs
Summary
4. Quickstart
Solderless Breadboard
How a Breadboard Works
Connecting a Breadboard to the Arduino
Connecting a Breadboard to the Raspberry Pi
Downloading the Software
Experiment: Controlling an LED
Parts List
Breadboard Layout
Arduino Connections
Arduino Software
Arduino Experimentation
Raspberry Pi Connections
Raspberry Pi Software
Raspberry Pi Experimentation
Comparing the Code
Experiment: Controlling a Motor
Parts List
Breadboard Layout
Experimenting Without Arduino or Raspberry Pi
Arduino Connections
Arduino Experimentation
Raspberry Pi Connections
Raspberry Pi Experimentation
Summary
5. Basic Electronics
Current, Voltage, and Resistance
Current
Voltage
Ground
Resistance
Power
Common Components
Resistors
Transistors
Bipolar transistors
Darlington transistors
MOSFETs
PNP and P-channel transistors
Transistor selection guide
Diodes
LEDs
Capacitors
Integrated Circuits
The Ins and Outs of Connections
Digital Outputs
Digital Inputs
Analog Inputs
Analog Outputs
Serial Communication
Summary
6. LEDs
Regular LEDs
Current Limiting
Project: Traffic Signal
Parts List
Design
Arduino Connections
Arduino Software
Raspberry Pi Connections
Raspberry Pi Software
PWM and LEDs
RGB LEDs
Experiment: Mixing Colors
Hardware
Parts List
Arduino Connections
Arduino Software
Arduino Experimentation
Raspberry Pi Connections
Raspberry Pi Software
Raspberry Pi Experimentation
Summary
7. Motors, Pumps, and Actuators
Controlling Speed (PWM)
Experiment: Controlling the Speed of a DC Motor
Hardware
Arduino Connections
Arduino Software
Arduino Experimentation
Raspberry Pi Connections
Raspberry Pi Software
Raspberry Pi Experimentation
Controlling DC Motors with a Relay
Switching a Relay with Arduino or Raspberry Pi
Relay Modules
Experiment: Controlling a DC Motor with a Relay Module
Parts List
Wiring
Arduino Software
Raspberry Pi Software
Choosing a Motor
Torque
RPM
Gears
Gearmotors
Pumps
Peristaltic Pumps
Velocity Pumps
Project: Arduino House Plant Waterer
Design
Parts List
Construction
Step 1: Solder leads to the motor
Step 2: Construct the breadboard
Step 3: Fix tubing onto the pump
Step 4: Final assembly
Software
Using the Project
Linear Actuators
Solenoids
Summary
8. Advanced Motor Control
H-Bridges
H-Bridge on a Chip
Experiment: Control the Direction and Speed of a Motor
Parts List
Design
Breadboard Layout
Experimenting
Arduino Connections
Arduino Software
Arduino Experimentation
Connecting the Raspberry Pi
Raspberry Pi Software
Raspberry Pi Experimentation
Other H-Bridge ICs
L298N
TB6612FNG
H-Bridge Modules
Project: Arduino Beverage Can Crusher
Parts List
Wiring
Mechanical Construction
Arduino Software
Summary
9. Servomotors
Servomotors
Controlling a Servo
Experiment: Control the Position of a Servomotor
Hardware
Parts List
Connecting the Arduino
Arduino Software
Experimenting with Arduino
Connecting the Raspberry Pi
Raspberry Pi Software
Experimenting with Raspberry Pi
Project: Pepe, the Dancing Raspberry Pi Puppet
Parts List
Design
Construction
Step 1: Extend the servo arms
Step 2: Make a chassis
Step 3: Glue the servos
Step 4: Adapt the puppet
Step 5. Wire everything up
Step 6: Run the test program
Step 7: Attach the puppet
Software
Using Pepe the Puppet
Summary
10. Stepper Motors
Stepper Motors
Bipolar Stepper Motors
Experiment: Controlling a Bipolar Stepper Motor
Parts List
Design
Arduino
Arduino Connections
Arduino Software (the Hard Way)
Arduino Software (the Easy Way)
Arduino Experimentation
Raspberry Pi
Raspberry Pi Connections
Raspberry Pi Software
Raspberry Pi Experimentation
Unipolar Stepper Motors
Darlington Arrays
Experiment: Controlling a Unipolar Stepper Motor
Hardware
Parts List
Arduino Connections
Raspberry Pi Connections
Software
Microstepping
Experiment: Microstepping on Raspberry Pi
Parts List
Raspberry Pi Connections
Software
Experimenting
Brushless DC Motors
Summary
11. Heating and Cooling
Resistive Heaters
Experiment: Resistor Heating
Parts List
Construction
Experimenting
Project: Arduino Random Balloon Popper
Parts List
Hardware
Software
Using the Balloon Popper
Heating Elements
Power and Energy
From Power to Temperature Increase
Boiling Water
Peltier Elements
How Peltier Elements Work
Practical Considerations
Project: Beverage Cooler
Parts List
Construction
Using the Project
Summary
12. Control Loops
The Simple Thermostat
Experiment: How Good Is On/Off Thermostatic Control?
Parts List
Design
Breadboard Layout
Software
Experimenting
Hysteresis
PID Control
Proportional (P)
Integral (I)
Derivative (D)
Tuning a PID Controller
Experiment: PID Thermostatic Control
Hardware
Arduino Software
Arduino Experimentation
Connecting the Raspberry Pi
Raspberry Pi Software
Raspberry Pi Experimentation
Project: A Thermostatic Beverage Cooler
Hardware
Parts List
Design
Construction
Step 1: Add the temperature probe
Step 2: Construct the breadboard
Step 3: Attach the cooling unit
Step 4: Attach the power socket
Arduino Software
Summary
13. Controlling AC
AC Switching in Theory
What Is Alternating Current?
Relays
Optoisolator
Zero-Crossing Optoisolators and Triacs
AC Switching in Practice
Relay Modules
Solid State Relays (SSRs)
The PowerSwitch Tail
Project: Raspberry Pi Timer Switch
Parts List
Construction
Software
Using the Project
Summary
14. Displays
LED Strips
Experiment: Controlling an RGB LED Strip Display
Parts List
Arduino Connections
Arduino Software
Raspberry Pi Connections
Raspberry Pi Software
I2C OLED Displays
Experiment: Using an I2C Display Module with Raspberry Pi
Parts List
Connections
Software
Experimentation
Project: Adding a Display to the Beverage Cooler Project
Parts List
Connections
Software
Summary
15. Sound
Experiment: Unamplified Speaker and Arduino
Parts List
Breadboard Layout
Arduino Software
Arduino Experimentation
Amplifiers
Experiment: Playing Sound Files on an Arduino
Parts List
Creating the Sound Data
Arduino Code
Arduino Experimentation
Connecting an Arduino to an Amplifier
Playing Sound Files on Raspberry Pi
Project: Pepe the Puppet Gets a Voice
Parts List
Breadboard Layout
Software
Using the Talking Puppet
Summary
16. The Internet of Things
Raspberry Pi and Bottle
Project: A Raspberry Pi Web Switch
Hardware
Software
Using the Web Switch
Arduino and Networks
Project: Puppet Twitter Notifier
Putting Pepe on the Internet
IFTTT (If This Then That)
Step 1: Create a new recipe
Step 2: Define the trigger
Step 3: Add the web request action
Step 4: Finish the recipe
Using the Project
Summary
A. Parts
Suppliers
Resistors and Capacitors
Semiconductors
Hardware
Miscellaneous
Pinouts
B. Raspberry Pi GPIO Pinout
Notes
Index
← Prev
Back
Next →
← Prev
Back
Next →