0% found this document useful (0 votes)
65 views4 pages

Alternative Arduino Interfaces - Learn - Sparkfun

très bon d'apprentissage

Uploaded by

Joslin Mutombo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

Alternative Arduino Interfaces - Learn - Sparkfun

très bon d'apprentissage

Uploaded by

Joslin Mutombo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

10/26/2016

AlternativeArduinoInterfaceslearn.sparkfun.com

AlternativeArduinoInterfaces
CONTRIBUTORS:
FAVORITE

JIMB0
7

ArduBlock
ArduBlockisaprogrammingenvironmentdesignedtomakephysicalcomputingwithArduinoaseasyasdraganddrop.Insteadofwritingcode,worryingabout
syntax,and(mis)placingsemicolons,ArduBlockallowsyoutovisuallyprogramwithansnappedtogetherlistofcodeblocks.

ArduBlockbuildsonthesimplicityofArduino,andcreatesaperfectbeginnergatewaytophysicalcomputing.Insteadoftearingyourhairoutdebugging,youcan
spendyourtimecreating!

InstallingArduBlock
ArduBlockissomethingofanaddontoArduino,soitrequiresthatyouhavetheArduinoIDEinstalled.Thebenefitofthat,though,isbecauseArduinoismulti
platformArduBlockworksonWindows,Mac,orLinux.Plus,havingArduinoalreadypresentmakesthetransitionfromvisualprogrammingtotextprogramming
easier,whentheinevitabilityapproaches.
InstallingArduBlockcanbealittletrickytheresnoinstaller,justaJavafilethatneedstobestoredinaveryspecificlocation.Followthestepsbelowtoinstallit:
1.DownloadandInstallArduino(ifyouhaventalready)ArdublockisanextensionofthedefaultArduinoIDE,soyoullneedtohaveArduinoinstalledonyour
computertorunit.CheckoutourInstallingArduinoIDEtutorialforhelpwiththat.
2.DownloadArduBlockClickthelinktotheleft,orheadovertotheArduBlockSourceforgepagetofindthelatestandgreatestversion.
3.IdentifyyourArduinoSketchbooklocationThisisafolderonyourcomputerwhereyoursketchesandlibrariesaresavedbydefault.Tofindyour
sketchbooklocation,runArduino,andopenPreferencesbygoingtoFile>Preferences.Thecontentsofthetoptextboxdefinesyoursketchbooklocation.
MemorizethatlocationandcloseArduino.

4.Create[sketchbook]/tools/ArduBlockTool/tool/TheArdublockfileyoudownloadedearlierneedstoliveinaveryspecificlocationwithinyourArduino
sketchbook.Navigatetoyoursketchbook,thencreateanestofthreedirectories:tools>ArduBlockTool>tool(watchout,eachfolderiscasesensitive).
5.Pasteardublockxxxxxxxx.jarInto/tool/PastetheArdublockfileyoudownloadedaJAR(JavaARchive)fileintothelastfolderinthenestyou
created.

https://learn.sparkfun.com/tutorials/alternativearduinointerfaces/ardublock

1/4

10/26/2016

AlternativeArduinoInterfaceslearn.sparkfun.com

6.StartArduinoOrrestartitifitwasopen.
7.SelecttheBoardandSerialPortJustasyouwouldifyouwereusingArduino,makeyourboardandserialportselectionsfromtheToolsmenu.
8.OpenArduBlockRunArduBlockbyclickingTools>ArduBlock.IfyoudontseeanentryforArduBlockhere,doublechecktomakesureyourdirectories
areallcorrectlytypedandcased.

ArduBlockworkshandinhandwiththeArduinoIDEitreliesontheIDEbeingopeninthebackground,sodontclosetheArduinowindow!

UsingArduBlock
TheArduBlockwindowissplitintotwohalves.Onthelefttherearebins,whichstoreeverypossibleblockyoucanaddtoyoursketch.Theblank,grayslatetothe
rightofthatiswhereyoudrawyoursketch.Toaddablocktoyoursketch,simplydragitfromthebinintotheblank,grayarea.
Tobegin,everyArduBlocksketchrequiresaProgramblock,whichyoucanfindintheControlbin.TheProgramblockdefinesthe setup and loop functionsthat
everyArduinoprogramrequires.

Fromthere,youcandragmoreBlocksover,snappingthemintoeitherthe loop or setup sections.Here,trymakingablinkprogram.Thesetdigitalpinblocks,


whicheffectadigitaloutput(analogoustoArduinos digitalWrite function),arefoundunderthePinsbin.Thedelaymillisecondsblock,foundunderControl,is
analogoustoa delay Arduinofunction.

https://learn.sparkfun.com/tutorials/alternativearduinointerfaces/ardublock

2/4

10/26/2016

AlternativeArduinoInterfaceslearn.sparkfun.com

ThenclickUploadtoArduinotosendyourdrawingofftoyourArduinoboard.YoucanALT+TABbackovertotheArduinowindowtocheckyourcodeuploadstatus.

Afteryouvesuccessfullyuploadedyourfirstsketch,continuetoplayaroundandexplorethecontentsoftheotherbins!

ArduBlockTips&Tricks
Youcancloneblocks,orgroupsofblocks,byrightclickingandselectingClone.Everythingfromtheblockyourightclickedtothebottomofthatgroupwillbe
copiedandpastedintothetopleftcornerofthewindow.Thisisahugetimesaverforbiggerdrawings.

YoucantemporarilyremovecodefromyoursketchbydraggingitoutoftheentiretyoftheProgramblock.AnythingnotconnectedtothemainProgramblockwill
beignoredwhenyourcodeiscompiled.Thisisagreatdebuggingtoolyoucanremoveablockofcodefromprogramexecution,whilenotactuallydeletingit,much
likecommentingoutcode.

Finally,ifyoupeekbackoverattheArduinowindow,afteryouveuploadedanArduBlockdrawing,youmaynoticesomethingdifferent.Tocreateyourcode,the
ArduBlockprogramsimplyparsesyourblocksandspitstheequivalentArduinocodeoverintotheArduinowindow.

Thisbecomesagreatlearningtoolifyoureinterestedintransitioningfromgraphicalprogrammingtotext.

ArduBlockResources
https://learn.sparkfun.com/tutorials/alternativearduinointerfaces/ardublock

3/4

10/26/2016

AlternativeArduinoInterfaceslearn.sparkfun.com

ArduBlockHomepage
ArduBlockGitHubRepository(OpenSource!)
SparkFunDigitalSandBoxExperimentGuideAseriesofArduinoexperimentsallbasedaroundArduBlock.

PREVIOUSPAGE
CODEBENDER

https://learn.sparkfun.com/tutorials/alternativearduinointerfaces/ardublock

VIEWASASINGLEPAGE

NEXTPAGE
MINIBLOQ

4/4

You might also like