-
Notifications
You must be signed in to change notification settings - Fork 0
/
VEXcode Project (2).goblocks
1 lines (1 loc) · 6.04 KB
/
VEXcode Project (2).goblocks
1
{"mode":"Blocks","workspace":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable id=\"U`9aA+=)r+L1tzA.)-qi\">myVariable</variable></variables><comment id=\"R5ER4l4PP(o(KzUU(pp|\" x=\"632\" y=\"18\" h=\"291\" w=\"418\">Project: Avoiding Obstacles \n\nDescription: This example project has the Code Base robot move until it detects an obstacle (for example, the wall on a VEX GO field). When the Eye Sensor on the Code Base detects an obstacle, Code Base will stop, drive in reverse, and then turn right. If no obstacle is detected, Code Base will drive forward.\n\nConfiguration: Code Base </comment><block type=\"go_events_when_started\" id=\".NsXwU_L.OuU1l7Sho$F\" deletable=\"false\" x=\"-130\" y=\"-10\"><next><block type=\"go_drivetrain_set_turn_velocity\" id=\"K5yCwJT?^C]3V`~BM*b=\"><value name=\"VELOCITY\"><shadow type=\"math_number\" id=\".,9Hs/9w)n/[bht0;U1{\"><field name=\"NUM\">25</field></shadow></value><next><block type=\"go_drivetrain_set_drive_velocity\" id=\"7(Vze$bUV8TyZNJ;%WL)\"><value name=\"VELOCITY\"><shadow type=\"math_number\" id=\"cDf@$3f6~!^yP2fK]0Ua\"><field name=\"NUM\">25</field></shadow></value><next><block type=\"go_sensing_eye_set_light_power\" id=\"6ni}5z6cbsY|Qa:.H.hO\"><value name=\"POWER\"><shadow type=\"math_whole_number\" id=\"BdrZZQt$V*Im1wAuxk+E\"><field name=\"NUM\">100</field></shadow></value><next><block type=\"go_magnet_energize\" id=\"Mtz@`7+BY`_?#T:qQA/s\"><field name=\"MAGNET\">magnet</field><field name=\"ACTION\">drop</field><next><block type=\"go_other_comment\" id=\"+B[.+v75rDPrpJR*l/)F\"><value name=\"COMMENT\"><shadow type=\"comment_text\" id=\"=lMu~.^}~q.)p^r2C`RU\"><field name=\"comment\">A forever loop allows the Eye Sensor to continuously check for obstacles </field></shadow></value><next><block type=\"go_control_forever\" id=\",~^Xie9__c||(6w3]v8c\"><statement name=\"SUBSTACK\"><block type=\"go_other_comment\" id=\"{W4l6H66Pmg;omU{T@lI\"><value name=\"COMMENT\"><shadow type=\"comment_text\" id=\"I*/dTI-5(U~m?;Ay%qb}\"><field name=\"comment\">If the Eye Sensor detects an obstacle, the blocks in the if branch will run </field></shadow></value><next><block type=\"go_control_if_elseif_else\" id=\".@Czyb=f!vXC:@p9U]+/\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" branches=\"3\"></mutation><value name=\"CONDITION1\"><block type=\"go_operator_less_than\" id=\"?O-K_+dBDtO/UtC.5y*J\"><value name=\"OPERAND1\"><shadow type=\"math_number\" id=\"@.r_9.oY!:Z;fc{!l$F*\"><field name=\"NUM\">0</field></shadow><block type=\"go_sensing_eye_brightness\" id=\"at~JQx;Y3/z4XNIJ0vzg\"></block></value><value name=\"OPERAND2\"><shadow type=\"math_number\" id=\"Es4-h-FJa0@O1PT~!x^n\"><field name=\"NUM\">25</field></shadow></value></block></value><statement name=\"SUBSTACK1\"><block type=\"go_drivetrain_stop_driving\" id=\"DfQ#=!{A6sDZgv0B2P+O\"><next><block type=\"go_drivetrain_turn_for\" id=\":/%0O,lLM`3Q8Uc!9vtO\"><field name=\"TURNDIRECTION\">right</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"K|$rkoq%Lv%y^J53Z_(g\"><field name=\"NUM\">20</field></shadow></value><next><block type=\"go_drivetrain_drive_for\" id=\"X`#3u/[)Qn]fuJl2p#gI\"><field name=\"DIRECTION\">rev</field><field name=\"UNITS\">mm</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"J450#pC=@fwL@ozMa4Hw\"><field name=\"NUM\">30</field></shadow></value></block></next></block></next></block></statement><value name=\"CONDITION2\"><block type=\"go_sensing_eye_detect\" id=\"n8}RF80[VCW!#@^Ay)li\"><field name=\"COLORS\">red</field></block></value><statement name=\"SUBSTACK2\"><block type=\"go_drivetrain_stop_driving\" id=\"_V*{V0U*#0B/7pM*r4nf\"><next><block type=\"go_magnet_energize\" id=\"-.J3l[~2*Upb9pzQ(D~[\"><field name=\"MAGNET\">magnet</field><field name=\"ACTION\">boost</field><next><block type=\"go_drivetrain_drive_for\" id=\"^hS2;-=IHo0/((m%NQ:z\"><field name=\"DIRECTION\">rev</field><field name=\"UNITS\">mm</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"ZzXS4Rf~dg0=tBAdoZ$d\"><field name=\"NUM\">10</field></shadow></value><next><block type=\"go_drivetrain_turn_for\" id=\"ve^iq9ZKBdE58{r|AN*n\"><field name=\"TURNDIRECTION\">right</field><field name=\"anddontwait_mutator\">false</field><value name=\"AMOUNT\"><shadow type=\"math_number\" id=\"$?9xB5T|NRTyU1;3K*4C\"><field name=\"NUM\">180</field></shadow></value></block></next></block></next></block></next></block></statement><value name=\"CONDITION3\"><block type=\"go_sensing_eye_detect\" id=\"0$e.jB?40hkDlKTNr;;E\"><field name=\"COLORS\">green</field></block></value><statement name=\"SUBSTACK3\"><block type=\"go_drivetrain_stop_driving\" id=\"}]F_fp`R0d@_IP+isPTC\"><next><block type=\"go_magnet_energize\" id=\"x3c7HfBVa}M{TE4sv,f6\"><field name=\"MAGNET\">magnet</field><field name=\"ACTION\">drop</field></block></next></block></statement><statement name=\"SUBSTACK_ELSE\"><block type=\"go_other_comment\" id=\"GDG_5Z0X6]MN*y2QmuR2\"><value name=\"COMMENT\"><shadow type=\"comment_text\" id=\"oIK=qApWFNph[}u!iXS3\"><field name=\"comment\">If the Eye Sensor does not detect an obstacle, Code Base will drive forward </field></shadow></value><next><block type=\"go_drivetrain_drive\" id=\"2noqVHmkm%!XUssUfqy$\"><field name=\"DIRECTION\">fwd</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block><block type=\"go_drivetrain_drive\" id=\"y5udD+RMG2@zJ.rJH/]{\" x=\"430\" y=\"730\"><field name=\"DIRECTION\">fwd</field></block></xml>","rconfig":[{"port":[1,2,3,4],"name":"Code Base","customName":false,"deviceType":"Code Base","deviceClass":"codebase","setting":{},"triportSourcePort":22}],"slot":0,"platform":"GO","sdkVersion":"20220726.10.00.00","appVersion":"3.0.3","fileFormat":"1.2.0","icon":"","targetBrainGen":"First","v5SoundsEnabled":false,"downloadLanguage":"python","virtualSkillsYear":"2023","monitorList":{"sensorList":["driveVelocityInpct","eyeFoundObject"],"variableList":[],"complexVarList":[]}}