Connecting Arduino. Programming And Networking With The Ethernet Shield.pdf

(9675 KB) Pobierz
m62
m62
Connecting Arduino: Programming and Networking with the Ethernet Shield
Copyright © 2014 Bob Hammell.
EBooks are not transferable. All rights reserved. No part of this publication may be
reproduced, distributed, or transmitted in any form or by any means, including
photocopying, recording, or other electronic or mechanical methods, without the
prior written permission of the publisher, except in the case of brief quotations
embodied in critical reviews and certain other non-commercial uses permitted by
copyright law.
Trademarked names, logos, and images may appear in this book. Rather than
use a trademark symbol with every occurrence of a trademarked name, logo, or
image, the names, logos, and images are used only in an editorial fashion and to
the benefit of the trademark owner, with no intention of infringement of the
trademark.
The information in this publication is provided by Bob Hammell on an “AS IS”
basis. Bob Hammell makes no warranties, express or implied, regarding use of
the information alone or in combination with your products. Neither the author nor
the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made.
Published in the United States of America by Bob Hammell.
ISBN-10 (Print): 1-500-74567-7
ISBN-13 (Print): 978-1-500-74567-7
ISBN-13 (ePub): 978-1-312-41034-3
Any source code or supplementary materials referenced by the author in this text
are available for readers at www.connectingarduino.com.
m62
m62
Table of Contents
Preface
Getting Started
Connecting the Ethernet Shield • Establishing a network connection •
Testing connections
Using SD Cards
Formatting and initializing SD cards • Reading and writing from SD
cards • Creating and removing directories
Arduino as a Web Client
Making HTTP GET and POST requests • Scraping webpages •
Handling timeouts • Sending tweets
Arduino as a Web Server
Using a static IP address • Port forwarding and dynamic DNS •
Accepting incoming HTTP connections • Serving files from the SD
card • Creating a web-based UI
Using UDP and Socket Programming
Communicating over UDP • Building a DNS server • Implementing a
custom application protocol
Appendix A – Hypertext Transfer Protocol – HTTP/1.0
Appendix B – DNS – Implementation and Specification
m62
Zgłoś jeśli naruszono regulamin