このセッションをご紹介します。MVBアプリケーションを紹介します。このセッションはアプリケーションです。私の名前はユディア・ヤマネです。私の名前はマサユシ・ダッカハシです。日本からです。私のキャットはマスコットです。私たちのユディア・ヤマネが、MVBアプリケーションを少し目指しています。MVBアプリケーションを紹介しました。私たちは、Yamanekoのゲットハブと他のサイトのアプリケーションを紹介しました。私たちは、MVBアプリケーションを紹介しました。このアプリケーションは、このセッションのコーナーについて紹介しました。このプロダクトを紹介します。あなたのプロダクトはセサレットです。ワーシュレットのモデルを知っていますか?このトイレは自然に開くことができます人気のアプロジェクトを開けますトイレはワーシュレットのタイプです水を温めるとボタンを押すとワーシュレットの水を使ってトイレのペーパーを使ってペーパーを見ることができますワーシュレットのモビーはトートウのウェブサイトですトートウはワーシュレットのフェーマンスメーカーですワーシュレットはトイレとマークのトートウですトートウはオッキーニングアンドクローリーですワーシュレットのモビーはスプレービヘビアですこのワーシュレットのモデルはレゴマインドソーナスですワーシュレットはセサミのコミュニティーですセサミはセサレットですセサミはエンベレッドシステムのデブルーバーを教えていますセサミはUML2ステートマシンダイアゴンを使っていますUMLを使っていますか?UMLを使っていますか?UMLを使っていますか?UMLはエンベレッドシステムのデブルーバーを使っていますUML2ステートマシンダイアゴンは2つの理由ですネステートステートとオクサノウステートを使っていますこの2つのダイアゴンを使っていますセサミのステートマシンをモデルしていますセサミのステートマシンダイアゴンはセサミです彼らの威力を教えてもらえるなら インスタイトクなコAyの裁判でもそうですインスタイトクなコAyの裁判でもそうですこれは を見てみましょうこれを セサ映像道を見ている場合オクサノウステートを連邦して里狙った時に ラバリックを弾いてスプレーを止めると、ステンサーを折り、リートクロードを折り、このルビーカンは、トンプラットクロードのM-LUVを使用するフレームワークを作り、多くの人はM-LUVを使用することができる。では、M-LUVを紹介するために紹介します。M-LUVは新しい語彙のLanguage but just a little bitimplementation of LUVLanguage.It complies with theISLUV specification,but it does not have any companywith the specification.Some class, Iof,File, and degradeEpsom are not included.You can use these classeswith an official library.The current state versionis 1.3.0.The syntax of M-LUVis similar with 2.x,but the key-wide argumentis not supported yet.M-LUV is used intodifferent situations.One is being embeddedin other applications,so asweb server, game, and so on.Other is embedded insystems for appliance.It is included inDobot, IofD, and other devices.We will talk about the latter case.This figure is a structureof an M-LUV application.We can use three typesof libraries.MRV lib, default MRV gem,and custom MRV gems.MRV gems areM-LUV libraries,like the VGems for MRI.MRV gems are loadedwhile executionof Ruby code.But MRV gems are staticallydippedin MRV codecore code.It's an important differencewith MRV gems.Because of that,we do not use therequire method in MRVRuby code.The video we have seenis a separate usingRuby.Today,we useother target board andCesaret.What do you needto port your applicationinto other board?At first,we shouldchoose target board,including MCU on the board.Performanceand memory size isimportant.Then,you choosethe board and peripherals.MRV gems islike Ruby gems for MRV.Some MRV gemscontrolling hardwareneed to see code.Others are only in Ruby.When you get enough MRV gems,you can write applicationitself in Ruby.Even so,why is porting MRVapplications so difficult?This reason we ask the questionis becauseMCU is different betweentargets.In embedded systems,which components aredifficult?MCU?Border?Peripherals?OS?So,we don'tshare code between differenttargets users.Another reason isthat MRV consumesless memorythan CRuby.MCU is huge for someMCU.How do we solve the issue?In many case,we makeplatform ascompatibility layer.Before asking about thecompatibility layer,we must first summarizeour policy.First,it should beeasy to use forusers.And fortunately,in orderto make someinford.Or do some work.But this can't beavoided.This work isn't too hardbecause we are standingon the soldiersof giants.Soldiers of giants.There are many compatibilitylayers we can use.Let's look them.Embedded is a popular platformand you can use embeddedwithout network.Many boards supportembedded and hugeamount of code andcubebox are very usefulfor developers.Adreno ismore popular than embedded.Adreno has manydemarcable points.We will see them in detail later.CMC's Cortex MicrocontrollerSoftware interfaceStandardis a vendor-independent hardwareabstraction layerfor Cortex MCU.The SimSys enablesconsistent device support.For example,SimSys DAP isinterface familiarfor a debug unit.We can debugprogram in MCUwithout any special hardwareSoftware.Another library is STM32QVMX Hub.QVMX is two librariesfor STMicroelectronicsMPU.HUD is a hardware abstractionlayer.This provides hardware abstractionlayer driverAPI.If you are using STMicro'sAPU,all of them can beused in the same way.HUD is also a kind ofcompatible layer.HUDwe can useTaskAPIand DAAPIwithout worrying abouthardware and configurations.Let's think about the design of our compatibility layer.It's notimpossible to writelow-level APIin C and every otherAPI in Rubyfrom scratch.If we do so,it's so more portablein the Ruby layer,but this policy needsdots of work.We have already usedEVC high-level C APIand we can useembedded libraries.We don't want todelete them in Ruby.In contrast to it,we may crash inlayer over other platforms.In this way,we need to do as much work to implement it.Usingmultiple layers,we might have a problemwith the performance overhead.But we don't haveso muchrequirements for performance,so we can ignore it.How about themruby API for application or such?We would like touse api in same manner.In other words,ruby api forsimular function hassimular method signature.Another requirementis the high protocol.Users should nothave to knowIshikashi or SPID-Ding byte or4 byte or 6 byte.Now,let's do demo.This is a newcessulate.Port it into another border.We use differentcensor and motors becauseOriginalcessulate useDegoOriginal products.So we choose general parts.His nameis Beadu.He is a mascot of Japanese airlineBeadu.He approachesopenHe sitand pushbuttonmove here.Ah,the sound is amazing.Heshimaranai.Even if he use anotherboard,the behavior is the same.Please wait.I tryanother board.He approachesit.Censor did it to himand did it open.He sit downand pushbuttonmove spray.stopandhe golead close.Thank you.Let's talk about our target board.We use the Lego Mindstorm EV3.EV3 supportsRenux and Altos.We use Altoscalled Toppers EV3-RT.As you see,we port it into two boards.ThinkThis pink board isGeralteach Lensas board.Geralteach has very powerfularm processor Cortex-A9.It has huge memoryso very easy to use MLB.We call it Peach.Another target board isNucleo F412ST Microsonics board.At first,we usedF401 board.This is major and chief boardNucleo family.Unfortunately,I caused a memory overflowwhile initializing MLB on the board.So,we changeF411 board.This board has more memories.If we deleteMRB from MLBthen we can executeMLB code.But we need some classes from MRBand if we add themthen memory overflow again.So,we getmore new board,this oneF412 board.This table showsprofile of our board.The architecture of EV3is bit old,butit's very powerful like older Raspberry Pi.The performanceof Peach is like smartphone.It doesn't have power of PCbut still very powerfulfor microcontroller.Nucleo consumes much lessmap battery.Nucleo XM4 is typical microcontrollerbut number is a bit small.The various combination patterntoday's implementationis like this table.Libraries are middlewarefor abstraction hardware.Additional connectivity meanswhether it has ordinary headersor not.This video shows that which boarduse which libraries.Gream area is library.If library has a lot of features,your MRBgenbecause are more simple.Now,let's explainruby code in cesareate.In this session,we explainonly the part of human sensorand open the lid.This behavior.Let's see how to usehumansensor class and lid class.First,we makehumansensor object and lid object.The argument of constructorare different part of board.If human sensor foundsomething and the lidis not open,open the lid.I will introducethe hardware the sensor uses.The implementationof human sensor use adifferent sensor between EV3and the other board.Same with the ctech sensor.IR sensor and distance sensorare used for detectingthe human.Distance sensor detect humanand return true or false.Distance sensor measure distanceto detected object.The distance sensorhas better accuracybut the distance sensoris expensive,so I only have one.IR sensor is cheaperand you can use an IR sensorfor the second sensorbut accuracy is reduced.In other word,you can useone IR sensor and one distancesensor or two distancesensor.Next is motor.EV3 motor has built-inrotation sensor withone degree resolutionfor precious control.On the other hand,peachand nuclear use generalpurpose DC motor.The speed of the DC motorcan be controlled by changingthe voltage.Since the functionare different,we mustdifferent API.Let's talk aboutimplementation of the detectedmethod and open method.The detected methoddetermine if there is a personand the open methodopen the lid.First,we talk aboutdetected method for EV3.This sensor measuresthe distance todetected object.It compares the acquired valueof the threshold and returnsthe result.It compareswhen you callthe open method,whichopen the lid,turned the motorby precious anglewhen called.On the otherhand,IR sensorconnected on peach,returnedif a human detected or not.The result is returnedas 1 or 0,thenconvert to true or falseand return.This motorwill not be given a specificangle.Instead,specify thesecond to the motorto turn the motor.Even if youuse different types of motors,theopen method should be designed so thatthe same result can be obtained.This will endure libraryportability.Nucleo isalso the same sensorand motors as peach,butuses IR sensor classand motor class for nucleo.The same IR sensor classand motor class are made forpeach and for nucleo respectivelybecause this layer needsto be implemented for each hardwaretype.Becausethere is a hard dependencebefore this layer.This is a proposalto unify the method nameof the sensor acquisition method.Although we already talkabout its content,it'simportant,so I will summarizeagain.AlthoughI feel that it's likely to beboth false and false,itis to make it an abstract namerather than concrete name method.For example,the name ofthe method that gets thevalue of sensor should be value.This name tend to be named afterthe API function being calledin C.However,MVusers do not need to knowwhat method in C is used to call this in this function.In the case of the sensor,if you call value,youget a value of sensor.Even there arethings that cannot takemultiple kind of valuesoccasionally.We may add rulessuch as returning them byalley of that.At first,I think thatit's simple and easy tounderstand.It needs to useimplementation.Only whenwe are complicated one.Ifyou need threshold,youshould have two APIs.Oneis an accessor for thethreshold.Another method isdetected.Detected methodcompare value and threshold.It'sjust simple case,sostill it's not enough.I'd like to talk about Arduino.Atfirst,we are notinterested in Arduino.Arduinois very popular,butArduinoUno is too small tome.But I had a chance touse Arduino.ThenI was very impressed byit.Why do you thinkArduino is so popular?Inmy opinion,thelanguage of Arduino is not soeasy,but even nonprogrammersusually write it and runon Arduino.Why doyou think they can doit?When peopletalk about Arduino,theyare talking about librariesor about IDE,let'ssee both in details.The libraryof Arduino is not only Arduino standardlibrary,but also other librariesfor various boards.Ifyou use major boards,youcan find an Arduino libraryfor the board.Sameis IDE.Arduino IDEhas variousconfiguration for popularboards.Ifyou use it,you can developeasily on the board.As I said,when youwant to configure yourboard and you can findlibrary and sameasimplecode for your board,youcan use the boardeven if you don't know howto program.If you haveworking sample code,modifyingit is not so hard.Thisis an important way toincrease users.Whenusers try to modifythe code and they succeed,thentheyalso upload it.Thiscycle builds good ecosystem inthe world.As Arduinois so popular that nobody usemrb,of course not.Arduinois not affect.Arduino IDE is goodfor one sketch,forone program.So if youwant to use multiple files,it'snot so easy.Codesof Arduino tend to besingle but long file.Anotherdefect is debugger.Inclose environment,developmentseem to be hardwithout debugger.It hasmade amrb debugger usingGTB protocol,but wegot few responses.Evenso,supportingdebugger is important thingsfor development embeddedsystems.Another goodpoint of Arduino iscompatibility headers,compatible headers.The headersof pitch and nucleo issame layout of IO pinsof Arduino.If a boardsupports this layout,we canuse Arduino shields on the board.Thisfigure is grppinout.This green areaand red area is compatiblewith Arduino pinout.Thisfigure is nucleopinout.Like previousfigures,green areaand red area issame layout as Arduino pinout.Let'scompere with grp pinoutand nucleo pinout.GPIO pinslayout are same,butother pins,such as serialpins,spipins,and so onare different.Thesetargets are verydifferent,but it's betterto use same pinout.Isaw thatmrb needs alit development environment,butnow I realized it'snot enough tospreadmrb.We needmore library and sample codesupporting many targetseasy to find in githubor google.Easyto use for beginners like Arduinolibrary.Ihope we can all worktogether.This iswhat we want to tell youin this session.If youfeel inspired,please join us and share your work.So,conclusion,wewent overtwo examples ofporting an application.Whatwe learned are,likeboard-interpreted codeand last differentarchitecture,and sharemany samples on the web.At last,we talk aboutfuture plan.Duringdevelopment of cesareate,ourbkth issue was memory.Wewant to serve it.Anotherplan is portingotherboards.Whilewe try to port,wehave several problems withmemories.Especially innucleos,we have trouble withmemory in the initializationphase and crashed.To solve the issue,we should usemore ROM other thanlian.It's not easy,andit might have an impact to othermrb users,but we cannotignore the issue,I guess.Another challenge isporting into non-armchips,such as ESP32.Incense will release another ARM plus ESP board.Thisboard lets you use ARMand ESP.Weare eager to acceptthis challenge.We toldthat we should serve theboard first at first,butwhat we really want to dois serve Ruby,language first,and we can usemrb on many boards.Let'stry to usemrb,developmrb gem,and shareyour story.Thankyou so much for listening toour presentation.