翻译.docx
《翻译.docx》由会员分享,可在线阅读,更多相关《翻译.docx(52页珍藏版)》请在冰豆网上搜索。
翻译
1.HowtoDrivea7-SegmentLEDwithanArduino
如何用Arduino驱动7段式的LED
∙Author:
RileyPorter
∙Timerequired:
30minutes.
∙Difficulty:
Moderate
作者:
RileyPorter
需要时间:
30分钟
难度:
中等
UsingtheArduinodevelopmentplatformyouwilllearnhowtodisplaynumbersandlettersonasingle7-segmentLEDdisplay.
使用Arduino开发平台,你将学习如何在单一7段led上显示数字和字母。
Therearemanywaystodrive7-segmentdisplays--thisisafairlysimplemethod.
有很多方法可以驱动7段式led----这是一个相当简单的方法。
However,thismethod,todriveevenoneLEDsegmentarray"burns"(occupies)manyofthedigitalI/OpinsonyourArduino.
不过,这种方法,可能为了驱动一段LED而将钉在你的Arduino上的I/O烧毁。
Inlaterprojects,I'llshowyouhowtouseadedicated7-segmentLEDdriver.
在以后的项目中,我将示范给你们看怎么使用专门的7段式led驱动。
Step1 —HowtoDrivea7-SegmentLEDwithanArduino
∙Gatheryouupyourgear:
∙准备好工具
∙2x220Ohmresistors(closetothatvalueisgoodenough)
∙2个220欧姆的电阻(找那种质量比较好的)
∙11xmaletomalejumperwires
∙11个公头对公头的跳线开关
∙1xBreadboard
∙1个电路板
∙1xArduinoDevelopmentBoard
∙1个Arduino开发版
Step2
∙Wireupyoursegment.UsetheFritzingimageasyourguide.
∙用电线链接你的led.用Fritzing作为你的指导
∙A=8,B=9,C=2,D=3,E=4,F=5,G=6
∙Thetwomiddlepins(Pin3andPin8)ontopandbottomgotoGround.(Ortothefirstlegofthe220Ohmresistor.Theseareourcurrent-limitingresistors.
∙中间的两个引脚(引脚3和引脚8)的顶部和底部接到面板上。
(或者接到220欧姆电阻的第一个引脚上.这是我们的限流电阻。
)
∙
∙
Step3
∙Loadthecodeandyou'regoodtogo:
∙加载代码,然后你可以好好干了.
oGetthecodeformhere:
http:
//bit.ly/ia3lv7
o从这里获取代码:
http:
//bit.ly/ia3lv7
∙IfyoucopyandpastethecodeintoyourArduinosketch,youwillseethatifeverythingishookedupcorrectly,itwillloopfromA-Fthen1-0.Thisisnotthemostinterestingproject.Howeveritdoeslaythegroundworktodisplayingdataona7-segmentLEDforyourArduinoprojects.
∙如果你将代码复制粘贴到你的Arduino梗概中,你将发现所有线路都正确的链接起来,它将会从A-F循环,然后1-0.这不是最有趣的项目.然而它为在你的Arduino设计中在7段式led上显示数据而奠定基础.
∙Theapproachweusedtodrivethisone7-segmentLEDtook8ofourdigitall/Olines.Thisisquiteafewlinesto"burn"forthisfunctionality.Howeverinupcomingtutorials,Iwillpostsomemoreelegantwaystodrive7-segmentdisplaysvsusing8digitalI/Olines.
∙我们运用的这种驱动7段式led的方式占用了8个I/O端口.这是以相当多的端口去实现这个功能.然而在接下来的教程中,我将列举一些更加专业的方法驱动7段式led来对比8端口的方法.
∙Inthecodethereare15functionsthatwilldisplaytheletterornumberoffunctionnameontheLEDdisplay.Meaningthatifyouweretorunseven();Thiswoulddisplaythenumber7onthedisplay.IfyouwriteaPinLOW,youareinfactturningonthatLED.IfyouwriteapinHIGHitisnowturnedoff.
∙在代码中有15个功能,它们将在led显示屏上以数字或字母的形式显示功能的名称.意思就是,如果你运行7,它将在显示器上显示数字7.如果你运行LOW,你实际上转到了led上.如果你运行HIGH,它将立即关闭.
∙That'sit!
Allyouhavetodonowistoprogramitdisplaysomethingusefulforyourproject.
∙就是这样!
你所要做的就是为你的设计显示有用的数据.
2.LiberateaUSBCardReaderfromaDumpedUSBPrinter
从废弃的usb打印机中提取一个usb读卡器
∙Author:
Erich
∙Difficulty:
Moderate
ThecolourUSBfaxprinterwasbeggingtobeliberatedfromthedumpster.Aswellassteppermotors,drivecablesandshafts,IwaskeentoseeifIcouldrepurposetheSDcardreaderbuiltintoit.
彩色usb传真打印机从垃圾站中被回收回来.以及步进电机,驱动器的电缆和轴,我渴望看看我是否能重新利用的SD卡读写器内置到它。
Step1 —LiberateaUSBCardReaderfromaDumpedUSBPrinter
∙Thisisthevictim.Anunlovedlexmarkscanner/fax/printer.Notethecardreaderonthefrontpanel
∙这是牺牲品.一个不被人所爱的lexmark扫描仪/传真机/打印机.注意前面板上的读卡器.
∙Onremovalofthescannerlid,anicesteppermotorandgearassemblyisfound.It'sakeeper.ThefrontpanelLCDdiaplylookedveryOEManddifficulttouse,buttherewereabunchoftactileswitchestobehadonthefrontpanelPCB.
∙在去掉扫描器盖,一个漂亮的步进电动机和起落架组件被发现。
这是一个门将。
前面板液晶diaply看上去非常的原始和难应用,但是有一群触觉开关在面板的PCB板上。
∙Ongettingintotheinnardsoftheprinter,thecardreaderwasnotjustaPCBmountedcardslotasIhadassumed,butastandaloneUSBcardreaderinit'sownright...ripeforthepicking.Notealsothenice8ohmspeakerattachedtothesidewall,andsomeniceRFsuppressionferritesonvariouscables.
∙在进入内部机构打印机,读卡器不仅仅是一个PCB安装的卡片槽,但我以为独立的USB读卡器在它自己的右边…成熟的选择。
请注意好8欧姆扬声器附在侧墙、铁素体和一些射电缆。
Step2
∙Thecardreader,shownontheright,iseasilyremoved.IthasatypeAUSBconnectordaughterboardattachedtoitwhichwecanignorefornow.
∙这个显示在右边的读卡器容易去掉.它有一种daughterboard连接到一个USB接头,我们可以忽略了。
∙TheFaxsubassembly,showntotheleftofthecardreaderhasalsobeenremoved.MostlybecauseithasaniceTypeBUSBdaughterboardonitwhichcanberepurposedtoprovideaconvenientconnectorforthecardreader.
∙传真机装配,显示左边的读卡器也被移除。
主要是因为它有一个不错的B型USBdaughterboard可以在这方面提供方便repurposed读卡器的连接器。
∙WecanusethecablealreadyattachedtotheTypeBdaughterboardtoplugintothecardreader,butfirst,somewiresneedtoswappedover.ThethirdphotoshowsthewiringorderneededgoingfromthetypeBdaughterboardtothecardreadersocket.Theshieldcablecanbeleftunconnected.Thecableoriginallyattachedtothecardreaderisremovedandputinthejunkbox.TheUSBcablewasfoundinthesamedumpster.
∙我们可以用已连接到B型daughterboard的电缆插入读卡器,但首先,线路需要替换。
第三张照片显示为需要连接的B型daughterboard读卡器插座。
剩下的屏蔽电缆可以不链接。
原来附在读卡机上的电缆被移除,并放入垃圾盒子。
USB电缆在相同的垃圾站被发现。
Step3
∙Thefinaltest.Thecardreaderispluggedintotheoldclunkerlinuxboxwithoutacardreader,anddmesgshowsusthatthecardreaderistalkingtothePC.Keentypeswouldnowassembleaniceboxtoputitallin...hmmm....maybelater...
∙最后的考验。
这个读卡机被插进老说我没有读卡器的linux盒,dmesg向我们表明,这个读卡器与电脑可以通信。
喜欢现在的类型能组装好箱子将这一切在…嗯....也许之后…
∙IdidkeepsomeoftheflatterpiecesofABSpanelfromtheprintertocutupforpartitions,dividersandfaceplatesinprojectboxes.
∙我做了一个ABS仪表盘将打印机分区,将它们的项目区分开来.
3.ASimpleTripWire
一个简单的地雷拉拔线
∙Author:
Lewis
∙Timerequired:
15to30Mins
Step1 —ASimpleTripWire
∙SolderABeeper/BuzzerToaCable
∙把一个蜂鸣器焊接到电线上
Step2
∙Put2pinseitherendofaboard
∙把2针中的任何一个钉在木板上
∙Putathirdpinwithaphotohook(makeSurethatifitswingsitwillcontactoneofthepins)
∙用第三针勾一个图像(确保在它摇摆时能接触到其中一根针)
Step3
∙SolderthecablewiththeBeeper/BuzzerOnTothepinthatthehookwhenswungroundwilltouch.
∙将电线和蜂鸣器焊接到针上,当钩子转向时会接触在一起
∙SolderAbatterypacktothehook.
∙将电池焊接到钩子上
Step4
∙Completethecircuitbysolderingthebatterypacktothebeeper/buzzer.
∙将电池装入,链接蜂鸣器,完成电路
Step5
∙NowWaitforsomeonetowalkintoyourtrap!
∙现在等待有人走进你的陷阱
4.Anti-RobberPresserPad
防盗板
∙Author:
Lewis
∙Timerequired:
1hour
MakeAsimplecircuitAndusePapercrafts!
用工艺纸张做一个简单的电路
Step1 —Anti-RobberPresserPad
∙Solderwiretoastripofcopper.x2
∙将电线焊接在铜条上.x2
Step2
∙Solder1ofthewirestoa9VBatteryPack
∙将其中一条电线焊接在9v电池底座上
Step3
∙SolderABeepertoTheOtherCopperStrip.
∙将蜂鸣器焊接到另一个铜条上
∙ThenConnectTheothersideoftheBeepertothebatteryPack!
∙然后将蜂鸣器的另一端链接到电池底座上
Step4
∙TapeAStripOfCopperTo1A4sheetofcard.x2
∙将铜条粘到a4卡纸上.x2
∙Makesurethatthe2stripsofcoppertouch
∙确保两个铜条接触
∙ToMakeitspringbackadd2layersofthickdoublesidedtape.
∙将它们弹回加入两层厚的双面胶带
Step5
∙NowStickAnothersheetofA4blackcardontop
∙现在贴一张黑色a4卡纸到另一面上
∙Nowwaitforsomeonetowalkonit.
∙现在等待有人走上去
5.UsingtheParallaxRFIDReaderwithanArduino
用Arduino来运行视差rfid阅读器
∙Author:
RileyPorter
∙Timerequired:
10to20minutes
Ifyou'veeverwantedtheabilitytousesomeformofhardware-basedauthenticationinyourprojectsthenthisistheboardtodoitwith.
如果你曾经想要用某种形式完成一种基于硬件的认证项目的能力,那么这个就是可以做这些的板。
”
TheParallaxRFID(RadioFrequencyIdentification)readerissupereasytoconfigure.
视RFID(无线射频识别)阅读器非常容易配置。
Itonlytakesfourwires!
ItusestheserialprotocoltotransferinformationfromRFIDcardstotheArduino.
它只需要四条导线!
它使用了串行协议把资讯从RFID卡传到Arduino。
ThisprojectisaquickintroductiononusingthisRFIDreaderwiththeArduinosystem.
这个项目将是一个快速的介绍RFID阅读器与Arduino系统。
Step1 —UsingtheParallaxRFIDReaderwithanArduino
∙Thisstepissimple.Justgatherupyourneededcomponents.Youwillneed:
∙这一步是简单的。
只是准备你需要的部件。
你将需要:
oJumperWires4x
o跳线开关电线4根
oParallaxRFIDReader1x
o视差RFID阅读器1个
oArduinoDevelopmentBoard1x
oArduino开发板1个
oOptionalBreadboard
o电路板
∙Thatsit!
Movingon....
∙就是这样!
继续....
Step2
∙WiretheRFIDreadertotheArduino.Followthepinmappingtextbelow.
∙将RFID阅读器用电线连至Arduino.链接针脚时遵循下面的文本
oArduinoTx=RFIDSOUT
oArduinoD2=RFIDEnable
oArduinoGND=RFIDGND
oArduino5v=RFIDVCC
∙D2meansDigitalPinnumber2.
Step3
∙TosssomecodeontotheArduino.
∙向Arduino输入代码.
oThereareMANYdifferentiterationsofArduinocodeforthisRFIDreader.However,thebestcodeIhaveseentodatewaswrittenbyBenjaminEckel.(http:
//bit.ly/1rq6R7)Ihavepostedhiscodeonmygithubaccountforarchivalpurposes.Youcangetithere:
http:
//bit.ly/hl4QQU
o有很多重复复杂的Arduino代码适用于RFID阅读器.但是我见到最好的代码是BenjaminEckel写的.我把他的代码放在我的github账户中.你能在这得到它:
http:
//bit.ly/hl4QQU
∙NowthattheRFIDreaderistalkingtoyourArduino,youarereadytohackthecodeupandcreateareallycoolproject!
∙现在.RFID阅读器能和你的Arduino通信了,你将准备好写入代码,创造出一个很酷的项目.
∙InsidethesendCodefunctioniswhatonewouldhackinordertousetheRFIDreaderforsomethingotherthanprintingthetagstoaterminal.Tofullyunderstandthecode,youshouldreadthedatasheetinfull.Youcangetithere.http:
//bit.ly/fII5yq
∙这段被发送的代码的功能是为了让RFIN阅读器其他东西的标签印刷至终端.为了深入了解代码,你应该完全读懂数据表.你能在这得到它:
http:
//b