From 1c9250b226fc701616b97cff5dcf2c1ceb4859f8 Mon Sep 17 00:00:00 2001 From: Dimi <34534835+dsiberia9s@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:49:37 +0700 Subject: [PATCH] Rename main.m5f to Lesson 9/main.m5f --- main.m5f => Lesson 9/main.m5f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename main.m5f => Lesson 9/main.m5f (99%) diff --git a/main.m5f b/Lesson 9/main.m5f similarity index 99% rename from main.m5f rename to Lesson 9/main.m5f index 852edfd..a5a5620 100644 --- a/main.m5f +++ b/Lesson 9/main.m5f @@ -1 +1 @@ -{"components":[{"id":"_coretwoscreen","createTime":1694064472539,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#FFFFFF","backgroundImage":"","size":0,"screenType":"default","type":"screen"},{"id":"____buttonA","createTime":1694064472539,"name":"ButtonA","buttonIndex":0,"x":44,"y":274,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1694064472539,"name":"ButtonB","buttonIndex":1,"x":158,"y":274,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1694064472539,"name":"ButtonC","buttonIndex":2,"x":273,"y":274,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"},{"id":"HrJsWS=I1P#jxPZ#","createTime":1694064593267,"isCoreTwo":true,"isCoreInk":false,"isPaper":false,"name":"image0","x":6,"y":33,"imagePath":"default.png","visibility":true,"imageInvert":false,"imageThreshold":128,"screenType":"default","type":"image","layer":5},{"id":"G1e=CSOicV17IROg","createTime":1694074072570,"isCoreTwo":true,"isPaper":false,"name":"label0","x":32,"y":8,"color":"#000","text":"label0","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":9},{"id":"OFdE@rAZ6Yb$TcaR","createTime":1694089594423,"isCoreTwo":true,"isPaper":false,"name":"label1","x":36,"y":157,"color":"#000","text":"label1","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":19},{"id":"-Op8Et7mGYg6ZfBV","createTime":1694089605067,"isCoreTwo":true,"isPaper":false,"name":"label2","x":240,"y":8,"color":"#000","text":"label2","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":21},{"id":"Fj$31Cz6^ELk#j6S","createTime":1694235321707,"isCoreTwo":true,"isPaper":false,"name":"label3","x":240,"y":164,"color":"#000","text":"label3","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":9},{"id":"0_c&lUtQRffrG48+","createTime":1694235358045,"isCoreTwo":true,"isCoreInk":false,"isPaper":false,"name":"image1","x":213,"y":33,"imagePath":"default.png","visibility":true,"imageInvert":false,"imageThreshold":128,"screenType":"default","type":"image","layer":10},{"id":"8gGR2F7M5kSCCpn&","createTime":1694235403757,"isCoreTwo":true,"isPaper":false,"name":"label4","x":55,"y":215,"color":"#000","text":"label4","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":14},{"id":"tcKSb%0NaP47gbCE","createTime":1694235430414,"isCoreTwo":true,"isPaper":false,"name":"label5","x":138,"y":215,"color":"#000","text":"label5","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":17},{"id":"5+l4!qyAxdFrxIB+","createTime":1694235441274,"isCoreTwo":true,"isPaper":false,"name":"label6","x":240,"y":215,"color":"#000","text":"label6","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":19}],"type":"core2","versions":"Beta","units":[{"id":"w8-Qiy80-DCUYs1Z","createTime":1694505257166,"type":"weigh","name":"weigh_0","port":"A","default":["A","B","C","E","Custom"],"user_port":["21","22"],"icon":"weigh.png","url":"https://docs.m5stack.com/en/unit/weight"}],"hats":[],"stamps":[],"blockly":"widthheighturllegacyClouddescriptioningredientNamemassStringunitsingredientMassingredientPageingredientsByWeightmealingredientPagesiingerdientIdingredientmassIntegermeasureGEThttps://www.themealdb.com/api/json/v1/1/random.phpmealGETFIRSTmealsingredientPage1ingredientPagesingredientsByWeightEQingredientPages0This dish has no ingredients that need to be measured by mass.1massInteger0weigh_0massIntegerMULTIPLYweigh_010200HTTP Request FailedAwasPressed0.1weigh_0launchscreenDescribe this function...#fffffflabel0#000000label0FONT_MONT_38label0Smart Kitchen Scaleslabel01label0250label0ALIGN_CENTERscreen00label1#999999label1FONT_MONT_18label1The network is being set up, dishes and resources are being loaded.label14label1320label1ALIGN_IN_BOTTOM_MIDscreen0-5label0Falselabel1FalsedrawMenuDescribe this function...label4#ff6600label4FONT_MONT_18label4> 0 <label40label440label4ALIGN_IN_BOTTOM_LEFTscreen300label5#ff6600label5FONT_MONT_18label5<label50label540label5ALIGN_IN_BOTTOM_MIDscreen00label6#ff6600label6FONT_MONT_18label6>label60label640label6ALIGN_IN_BOTTOM_RIGHTscreen-450label4Falselabel5Falselabel6FalseBwasPressed0.1GTingredientPage1ingredientPage-1CwasPressed0.1LTingredientPageingredientPagesingredientPage1drawMealDescribe this function...image0http://cyrillic.m5stack.com/html2img?url=https://www.themealdb.com/images/media/meals/a15wsa1614349126.jpg/preview&width=200&height=200150150strMealThumbmeal/previewFALSElabel0Truelabel1Truei2550-50i0i0i5image0ALIGN_IN_LEFT_MIDscreen00image0Falselabel0#999999label0FONT_MONT_26label0Smart Kitchen ScalesstrMealmeallabel04label0140label0ALIGN_IN_TOP_LEFTscreen55label0FalsedrawMassDescribe this function...massStringmassString = '{:05d}'.format(massInteger)ANDGTEmassIntegerMULTIPLY0.95ingredientMassLTEmassIntegerMULTIPLY1.05ingredientMasslabel3#66ff99label3#999999label3FONT_MONT_34label3massStringlabel30label3100label3ALIGN_IN_RIGHT_MIDscreen-1870label3FalsecollectIngridientsDescribe this function...import reunitsg11Grams11ml11oz28.3495lbs453.592lb453.592453.592L10001000kg10001000gal3785.41ingredientsByWeighti1201ingerdientIdstrIngredientiingredientingerdientIdmealOREQingredientEQingredient0BREAKmeasurestrMeasureimealmeasure = re.sub(r'(\\d)([a-zA-Z])', r'\\1 \\2', measure)measureSPLITmeasure massString0massStringMULTIPLYGET_REMOVEFIRSTmeasureGET_REMOVEFIRSTmeasureunitsException for mass for ingerdientIdNEQmassString0INSERTLASTingredientsByWeightingerdientIdmassStringstrMealmealingredientsByWeightdrawIngredientDescribe this function...ingredientNameGETFIRSTGETFROM_STARTingredientsByWeightingredientPagemealingredientMassROUNDGETLASTGETFROM_STARTingredientsByWeightingredientPagelabel1#999999label1FONT_MONT_14label1Smart Kitchen ScalesPage ingredientPage from ingredientPageslabel10label1100label1ALIGN_IN_TOP_RIGHTscreen-2540label2#999999label2FONT_MONT_22label2ingredientName ingredientMass glabel24label2120label2ALIGN_IN_TOP_RIGHTscreen-1510label1Falselabel2Falseimage1http://cyrillic.m5stack.com/html2img?url=https://www.themealdb.com/images/media/meals/a15wsa1614349126.jpg/preview&width=200&height=200100100 %20https://www.themealdb.com/images/ingredients/ingredientName-small.pngFALSEimage1ALIGN_IN_RIGHT_MIDscreen-25-5image1FalsehideAllDescribe this function...label0Truelabel1Truelabel2Truelabel3Truelabel4Truelabel5Truelabel6Trueimage0Trueimage1TrueerrorscreenDescribe this function...label0Errorlabel1#ff6666label1ErrordescriptionadaptImageDescribe this function...OREQlegacyCloudEQlegacyCloudFALSEurlhttps://cyrillic.m5stack.com/html2img?url=urlurlhttp://tools.m5stack.com/html2img?url=urlurlurl&width=widthurlurl&height=heighturl","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1694505257166,"name":"M5RemoteTitle","dragAndDrop":false,"resizable":false,"options":{"minWidth":1,"minHeight":1,"maxWidth":6,"maxHeight":10,"defaultWidth":2,"defaultHeight":1},"w":2,"h":1,"bgColor":"#0080FF","color":"#fff","fontsize":"M","label":"M5Remote","interval":3000,"code":"","event":"","dataSource":"none","ezdataToken":"gOUNMRD5YZQ17hkcjoE9rRfqjimq5PML","topic":"","needShadow":false,"type":"title","x":0,"y":0}],"modules":[],"cbIdList_":[],"eventCBIdList_":[],"apikey":"583F445C","uuid":"70323b8b-7738-4ab7-bb26-383b74797cd9"} \ No newline at end of file +{"components":[{"id":"_coretwoscreen","createTime":1694064472539,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#FFFFFF","backgroundImage":"","size":0,"screenType":"default","type":"screen"},{"id":"____buttonA","createTime":1694064472539,"name":"ButtonA","buttonIndex":0,"x":44,"y":274,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1694064472539,"name":"ButtonB","buttonIndex":1,"x":158,"y":274,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1694064472539,"name":"ButtonC","buttonIndex":2,"x":273,"y":274,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"},{"id":"HrJsWS=I1P#jxPZ#","createTime":1694064593267,"isCoreTwo":true,"isCoreInk":false,"isPaper":false,"name":"image0","x":6,"y":33,"imagePath":"default.png","visibility":true,"imageInvert":false,"imageThreshold":128,"screenType":"default","type":"image","layer":5},{"id":"G1e=CSOicV17IROg","createTime":1694074072570,"isCoreTwo":true,"isPaper":false,"name":"label0","x":32,"y":8,"color":"#000","text":"label0","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":9},{"id":"OFdE@rAZ6Yb$TcaR","createTime":1694089594423,"isCoreTwo":true,"isPaper":false,"name":"label1","x":36,"y":157,"color":"#000","text":"label1","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":19},{"id":"-Op8Et7mGYg6ZfBV","createTime":1694089605067,"isCoreTwo":true,"isPaper":false,"name":"label2","x":240,"y":8,"color":"#000","text":"label2","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":21},{"id":"Fj$31Cz6^ELk#j6S","createTime":1694235321707,"isCoreTwo":true,"isPaper":false,"name":"label3","x":240,"y":164,"color":"#000","text":"label3","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":9},{"id":"0_c&lUtQRffrG48+","createTime":1694235358045,"isCoreTwo":true,"isCoreInk":false,"isPaper":false,"name":"image1","x":213,"y":33,"imagePath":"default.png","visibility":true,"imageInvert":false,"imageThreshold":128,"screenType":"default","type":"image","layer":10},{"id":"8gGR2F7M5kSCCpn&","createTime":1694235403757,"isCoreTwo":true,"isPaper":false,"name":"label4","x":55,"y":215,"color":"#000","text":"label4","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":14},{"id":"tcKSb%0NaP47gbCE","createTime":1694235430414,"isCoreTwo":true,"isPaper":false,"name":"label5","x":138,"y":215,"color":"#000","text":"label5","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":17},{"id":"5+l4!qyAxdFrxIB+","createTime":1694235441274,"isCoreTwo":true,"isPaper":false,"name":"label6","x":240,"y":215,"color":"#000","text":"label6","font":"FONT_MONT_14","rotation":0,"screenType":"default","type":"label","layer":19}],"type":"core2","versions":"Beta","units":[{"id":"w8-Qiy80-DCUYs1Z","createTime":1694505257166,"type":"weigh","name":"weigh_0","port":"A","default":["A","B","C","E","Custom"],"user_port":["21","22"],"icon":"weigh.png","url":"https://docs.m5stack.com/en/unit/weight"}],"hats":[],"stamps":[],"blockly":"widthheighturllegacyClouddescriptioningredientNamemassStringunitsingredientMassingredientPageingredientsByWeightmealingredientPagesiingerdientIdingredientmassIntegermeasureGEThttps://www.themealdb.com/api/json/v1/1/random.phpmealGETFIRSTmealsingredientPage1ingredientPagesingredientsByWeightEQingredientPages0This dish has no ingredients that need to be measured by mass.1massInteger0weigh_0massIntegerMULTIPLYweigh_010200HTTP Request FailedAwasPressed0.1weigh_0launchscreenDescribe this function...#fffffflabel0#000000label0FONT_MONT_38label0Smart Kitchen Scaleslabel01label0250label0ALIGN_CENTERscreen00label1#999999label1FONT_MONT_18label1The network is being set up, dishes and resources are being loaded.label14label1320label1ALIGN_IN_BOTTOM_MIDscreen0-5label0Falselabel1FalsedrawMenuDescribe this function...label4#ff6600label4FONT_MONT_18label4> 0 <label40label440label4ALIGN_IN_BOTTOM_LEFTscreen300label5#ff6600label5FONT_MONT_18label5<label50label540label5ALIGN_IN_BOTTOM_MIDscreen00label6#ff6600label6FONT_MONT_18label6>label60label640label6ALIGN_IN_BOTTOM_RIGHTscreen-450label4Falselabel5Falselabel6FalseBwasPressed0.1GTingredientPage1ingredientPage-1CwasPressed0.1LTingredientPageingredientPagesingredientPage1drawMealDescribe this function...image0http://cyrillic.m5stack.com/html2img?url=https://www.themealdb.com/images/media/meals/a15wsa1614349126.jpg/preview&width=200&height=200150150strMealThumbmeal/previewFALSElabel0Truelabel1Truei2550-50i0i0i5image0ALIGN_IN_LEFT_MIDscreen00image0Falselabel0#999999label0FONT_MONT_26label0Smart Kitchen ScalesstrMealmeallabel04label0140label0ALIGN_IN_TOP_LEFTscreen55label0FalsedrawMassDescribe this function...massStringmassString = '{:05d}'.format(massInteger)ANDGTEmassIntegerMULTIPLY0.95ingredientMassLTEmassIntegerMULTIPLY1.05ingredientMasslabel3#66ff99label3#999999label3FONT_MONT_34label3massStringlabel30label3100label3ALIGN_IN_RIGHT_MIDscreen-1870label3FalsecollectIngridientsDescribe this function...import reunitsg11Grams11ml11oz28.3495lbs453.592lb453.592453.592L10001000kg10001000gal3785.41ingredientsByWeighti1201ingerdientIdstrIngredientiingredientingerdientIdmealOREQingredientEQingredient0BREAKmeasurestrMeasureimealmeasure = re.sub(r'(\\d)([a-zA-Z])', r'\\1 \\2', measure)measureSPLITmeasure massString0massStringMULTIPLYGET_REMOVEFIRSTmeasureGET_REMOVEFIRSTmeasureunitsException for mass for ingerdientIdNEQmassString0INSERTLASTingredientsByWeightingerdientIdmassStringstrMealmealingredientsByWeightdrawIngredientDescribe this function...ingredientNameGETFIRSTGETFROM_STARTingredientsByWeightingredientPagemealingredientMassROUNDGETLASTGETFROM_STARTingredientsByWeightingredientPagelabel1#999999label1FONT_MONT_14label1Smart Kitchen ScalesPage ingredientPage from ingredientPageslabel10label1100label1ALIGN_IN_TOP_RIGHTscreen-2540label2#999999label2FONT_MONT_22label2ingredientName ingredientMass glabel24label2120label2ALIGN_IN_TOP_RIGHTscreen-1510label1Falselabel2Falseimage1http://cyrillic.m5stack.com/html2img?url=https://www.themealdb.com/images/media/meals/a15wsa1614349126.jpg/preview&width=200&height=200100100 %20https://www.themealdb.com/images/ingredients/ingredientName-small.pngFALSEimage1ALIGN_IN_RIGHT_MIDscreen-25-5image1FalsehideAllDescribe this function...label0Truelabel1Truelabel2Truelabel3Truelabel4Truelabel5Truelabel6Trueimage0Trueimage1TrueerrorscreenDescribe this function...label0Errorlabel1#ff6666label1ErrordescriptionadaptImageDescribe this function...OREQlegacyCloudEQlegacyCloudFALSEurlhttps://cyrillic.m5stack.com/html2img?url=urlurlhttp://tools.m5stack.com/html2img?url=urlurlurl&width=widthurlurl&height=heighturl","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1694505257166,"name":"M5RemoteTitle","dragAndDrop":false,"resizable":false,"options":{"minWidth":1,"minHeight":1,"maxWidth":6,"maxHeight":10,"defaultWidth":2,"defaultHeight":1},"w":2,"h":1,"bgColor":"#0080FF","color":"#fff","fontsize":"M","label":"M5Remote","interval":3000,"code":"","event":"","dataSource":"none","ezdataToken":"gOUNMRD5YZQ17hkcjoE9rRfqjimq5PML","topic":"","needShadow":false,"type":"title","x":0,"y":0}],"modules":[],"cbIdList_":[],"eventCBIdList_":[],"apikey":"583F445C","uuid":"70323b8b-7738-4ab7-bb26-383b74797cd9"}