资源描述:
《Arduino Cookbook.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ArduinoCookbookArduinoCookbookMichaelMargolisBeijing•Cambridge•Farnham•Köln•Sebastopol•TokyoArduinoCookbookbyMichaelMargolisCopyright©2011MichaelMargolisandNicholasWeldin.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005Graven
2、steinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:(800)998
3、-9938orcorporate@oreilly.com.Editors:SimonSt.LaurentandBrianJepsonIndexer:LucieHaskinsProductionEditor:TeresaElseyCoverDesigner:KarenMontgomeryCopyeditor:AudreyDoyleInteriorDesigner:DavidFutatoProofreader:TeresaElseyIllustrator:RobertRomanoPrintingHistory:March20
4、11:FirstEdition.NutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,Inc.ArduinoCookbook,theimageofatoyrabbit,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodis
5、tinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsa
6、ssumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcon-tainedherein.ISBN:978-0-596-80247-9[LSI]1299267108TableofContentsPreface....................................................................xiii1.GettingStarted..........
7、...............................................11.1InstallingtheIntegratedDevelopmentEnvironment(IDE)41.2SettingUptheArduinoBoard61.3UsingtheIntegratedDevelopmentEnvironment(IDE)toPrepareanArduinoSketch81.4UploadingandRunningtheBlinkSketch111.5CreatingandSavingaS
8、ketch131.6UsingArduino152.MakingtheSketchDoYourBidding.......................................192.1StructuringanArduinoProgram202.2UsingSimplePrimitiveTypes(Var