hlxldb

LED光立方制作全过程(四十五)

这篇文章终于进入最后两个步骤了,感谢大家长时间的支持呀,特别那些锲而不舍一直追看的筒子们!遗憾的是由于外文网站,很多视频都没办法分享了,大家都懂的就不解释啦。话说到翻译版,最近是没办法更新了,忙着毕业,呵呵~好了,进入本连载的&

LED光立方制作全过程(四十四)

Step69PCSoftware:Effect4,ConwaysGameofLife3DTheGameofLife,alsoknownsimplyasLife,isacellularautomatondevisedbytheBritishmathematicianJohnHortonConway.YoucanreadmoreaboutthisonWikipedia,ifyouhaventheardaboutitbefore.Bypopulardemand,wehaveimplementedGam

LED光立方制作全过程(四十三)

Step67PCSoftware:Effect2,sidewavesThisisbasicallytheexactsamefunctionastheripplefunction.Theonlydifferenceisthecoordinatesofthepointusedtocalculatethedistancetoeachx/ycoordinate.Wecallthispointtheorigin,sincethewaveemanatesfromthispoint.T

LED光立方制作全过程(四十二)

Step65PCSoftware:CubeupdaterthreadIncube.cwehaveafunctioncalledcube_push().Thistakesthe64bytearrayandsendsitdowntheseriallinetotheLEDcube.Italsohandlestheformatting,sendingevery0xffbytetwicebecause0xffisourescapecharacter.0xffand0x00issentfirst

LED光立方制作全过程(四十一)

Step63Software:RS-232inputTogeneratethemostawesomeeffects,weuseadesktopcomputer.Computerscandofloatingpointcalculationsandstufflikethatmuchquickerthanamicrocontroller.Andyoudonthavetore-programthemicrocontrollerforeveryeffectyoumake,oreverytime

LED光立方制作全过程(四十)

Step61Software:Effect5,axisupdownrandsuspendThisisoneofourfavoriteeffects.Thevoxelsrandomlysuspendedinthecubegivesanice3ddepth,especiallyifyoumoveyourheadwhileviewingtheeffect.64voxelsstartoutononeofthesidewalls.Thentheyallgetassignedarandommid

LED光立方制作全过程(三十九)

Step60Software:Effect4,boxshrinkgrowandwoopwoopiInstructJS.load(['instruct','imagespot'],function(){varspotspot1299877=newImageSpot('spot1299877',{loadID:'FRKNTEEGI0TK2RH',editimagedata:'false',imageDataEditorPlace:'',showInfo:true,

LED光立方制作全过程(三十八)

Step59Software:Effect3,sendvoxelsrandomZThiseffectsendsvoxelsupanddowntheZaxis,astheimplies.voidsendvoxels_rand_z()takesthreearguments.Iterationsisthenumberoftimesavoxelissentupordown.Delayisthespeedofthemovement(higherdelaymeanslowerspeed).Wai

LED光立方制作全过程(三十七)

Step58Software:Effect2,planeboingiInstructJS.load(['instruct','imagespot'],function(){varspotspot740584=newImageSpot('spot740584',{loadID:'F6L3GT0GI0TMGUD',editimagedata:'false',imageDataEditorPlace:'',showInfo:true,size

LED光立方制作全过程(三十六)

Step57Software:Effect1,rainiInstructJS.load(['instruct','imagespot'],function(){varspotspot740426=newImageSpot('spot740426',{loadID:'FOY1PD8GICYB274',editimagedata:'false',imageDataEditorPlace:'',showInfo:true,size:'MEDIUM'});newIma

LED光立方制作全过程(三十五)

Step55Software:CubevirtualspaceNowthatwehaveacubebufferandanicelittlecollectionoflowleveldrawfunctionstopopulateit,weneedtoagreeonwhichwaysiswhat,andwhatisupandwhatisdown;)Fromnowon,thenativepositionoftheLEDcubewillbewiththecablesco

LED光立方制作全过程(三十四)

Step54Software:LowlevelfunctionsWehavemadeasmalllibraryoflowlevelgraphicfunctions.Therearethreemainreasonsfordoingthis.MemoryfootprintTheeasiestwaytoaddresseachvoxelwouldbethroughathreedimensionalbufferarray.Likethis:unsignedcharcube[x][y][z];(charme

LED光立方制作全过程(三十三)

Step53Software:InterruptroutineimagenotfoundTheinterruptroutinepullsOutputEnablehighwhilerunningtodisabletheoutputofthelatcharray.chriimagenotfoundLayer0isonchrLayer1isonchrMyoscilloscopedoesnthave8channels,soIcanonlyshowthefi

LED光立方制作全过程(三十二)

Step52Software:ModeselectionandrandomseedimagenotfoundblinkblinkblinkchriWhenwefirststartedwritingeffectsanddebuggingthem,wenoticedthatthefunctionsusingrandomnumbersdisplayedtheexactsameanimationseverytime.Itwasrandomalright,butthesameran

LED光立方制作全过程(三十一)

Step51Software:IOinitializationThefirstthingtheATmegadoesafterboot,istocalltheioinit()function.ThisfunctionsetsupIOports,timers,interruptsandserialcommunications.AllIOportsontheATmegaarebi-directional.Theycanbeusedeitherasaninputoranoutput.Weconfigur