Programming Arduino Getting Started with Sketches



Yüklə 5,42 Kb.
Pdf görüntüsü
səhifə3/78
tarix22.12.2023
ölçüsü5,42 Kb.
#189286
1   2   3   4   5   6   7   8   9   ...   78
Arduino SimonMonk 2011

2
 Getting Started
Powering Up
Installing the Software
Uploading Your First Sketch
The Arduino Application
Conclusion
3
 C Language Basics


Programming
What Is a Programming Language?
Blink—Again!
Variables
Experiments in C
Numeric Variables and Arithmetic
Commands
if
for
while
The #define Directive
Conclusion
4
 Functions
What Is a Function?
Parameters
Global, Local, and Static Variables
Return Values
Other Variable Types
floats
boolean
Other Data Types
Coding Style
Indentation
Opening Braces
Whitespace
Comments
Conclusion
5
 Arrays and Strings
Arrays
Morse Code SOS Using Arrays
String Arrays
String Literals


String Variables
A Morse Code Translator
Data
Globals and Setup
The 
loop
 function
The 
flashSequence
 Function
The 
flashDotOrDash
 Function
Putting It All Together
Conclusion
6
 Input and Output
Digital Outputs
Digital Inputs
Pull-up Resistors
Internal Pull-up Resistors
Debouncing
Analog Outputs
Analog Input
Conclusion
7
 The Standard Arduino Library
Random Numbers
Math Functions
Bit Manipulation
Advanced I/O
Generating Tones
Feeding Shift Registers
Interrupts
Conclusion
8
 Data Storage
Constants
The PROGMEM Directive
EEPROM
Storing an 
int
 in EEPROM


Storing a 
float
 in EEPROM (Unions)
Storing a String in EEPROM
Clearing the Contents of EEPROM
Compression
Range Compression
Conclusion
9
 LCD Displays
A USB Message Board
Using the Display
Other LCD Library Functions
Conclusion
10
 Arduino Ethernet Programming
Ethernet Shields
Communicating with Web Servers
HTTP
HTML
Arduino as a Web Server
Setting Arduino Pins over the Network
Conclusion
11
 C++ and Libraries
Object Orientation
Classes and Methods
Built-in Library Example
Writing Libraries
The Header File
The Implementation File
Completing Your Library
Conclusion
Index



ACKNOWLEDGMENTS
I thank
Linda for giving me the time, space, and support to write this book and for putting
up with the various messes my projects create around the house.
I also thank Stephen and Matthew Monk for taking an interest in what their Dad is up to
and their general assistance with project work.
Finally, I would like to thank Roger Stewart, Sapna Rastogi, and everyone involved in
the production of this book. It’s a pleasure to work with such a great team.



INTRODUCTION
Arduino interface
boards provide a low-cost, easy-to-use technology to create
microcontroller-based projects. With a little electronics, you can make your Arduino do all
sorts of things, from controlling lights in an art installation to managing the power on a
solar energy system.
There are many project-based books that show you how to connect things to your
Arduino, including 
30 Arduino Projects for the Evil Genius
by this author. However, the
focus of this book is on programming the Arduino.
This book will explain how to make programming the Arduino simple and enjoyable,
avoiding the difficulties of uncooperative code that so often afflict a project. You will be
taken through the process of programming the Arduino step by step, starting with the
basics of the C programming language that Arduinos use.

Yüklə 5,42 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   78




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin