Download Python Programming for Arduino - Pratik Desai2015-05
Transcript
Conventions
Inthisbook,youwillfindanumberoftextstylesthatdistinguishbetweendifferentkinds
ofinformation.Herearesomeexamplesofthesestylesandanexplanationoftheir
meaning.
Codewordsintext,databasetablenames,foldernames,filenames,fileextensions,
pathnames,dummyURLs,userinput,andTwitterhandlesareshownasfollows:“While
assigningthevaluetotheweightvariable,wedidn’tspecifythedatatype,butthePython
interpreterassigneditasanintegertype,int.”
Ablockofcodeissetasfollows:
/*
Blink
TurnsonanLEDonforonesecond,thenoffforonesecond,repeatedly.
Thisexamplecodeisinthepublicdomain.
*/
//Pin13hasanLEDconnectedonmostArduinoboards.
//giveitaname:
intled=13;
//thesetuproutinerunsoncewhenyoupressreset:
voidsetup(){
//initializethedigitalpinasanoutput.
pinMode(led,OUTPUT);
}
//thelooproutinerunsoverandoveragainforever:
voidloop(){
digitalWrite(led,HIGH);//turntheLEDon(HIGHisthevoltagelevel)
delay(1000);//waitforasecond
digitalWrite(led,LOW);//turntheLEDoffbymakingthevoltageLOW
delay(1000);//waitforasecond
}
Anycommand-lineinputoroutputiswrittenasfollows:
$sudoeasy_installpip
Newtermsandimportantwordsareshowninbold.Wordsthatyouseeonthescreen,
forexample,inmenusordialogboxes,appearinthetextlikethis:“IntheSystem
window,clickontheAdvancedsystemsettingsintheleftnavigationbartoopena
windowcalledSystemProperties.”
Note
Warningsorimportantnotesappearinaboxlikethis.
Tip
Tipsandtricksappearlikethis.
Related documents
LAMPIRAN A Program pada arduino uno
Raspberry Pi Cookbook
Arduino et RasPi sont connectés! - Framboise 314, le Raspberry Pi
Esco la Su p e rio r d e Te cn o lo g ia e G e stã o d e V ise u
AlaMode User Manual
Astro-Physics Command Center (APCC) Help File
PoKeys57CNC User`s manual
BlackCube Clima - Meilhaus Electronic
Manual - Network thermometer Querx PT100
Querx WLAN - preliminary manual
Transport layer security protocol for SPWFxxx module
USER MANUAL PDF rev. 1.02