This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.v5python
executable file
·1 lines (1 loc) · 4.67 KB
/
example.v5python
1
{"mode":"Text","textContent":"#region VEXcode Generated Robot Configuration\nfrom vex import *\nimport urandom\n\n# Brain should be defined by default\nbrain=Brain()\n\n# Robot configuration code\ncontroller_1 = Controller(PRIMARY)\nmotor_1 = Motor(Ports.PORT1, GearSetting.RATIO_18_1, False)\nmotor_2 = Motor(Ports.PORT2, GearSetting.RATIO_18_1, False)\nmotor_3 = Motor(Ports.PORT3, GearSetting.RATIO_18_1, False)\nmotor_4 = Motor(Ports.PORT4, GearSetting.RATIO_36_1, False)\nmotor_5 = Motor(Ports.PORT5, GearSetting.RATIO_18_1, False)\n# vex-vision-config:begin\nvision_11__BLUE_ = Signature(1, 579, 929, 754,-527, -127, -326,2.1, 0)\nvision_11__RED_ = Signature(2, 9401, 9831, 9616,-2791, -2629, -2710,8.9, 0)\nvision_11__R2 = Signature(3, 0, 0, 0,0, 0, 0,3, 0)\nvision_11 = Vision(Ports.PORT11, 50, vision_11__BLUE_, vision_11__RED_, vision_11__R2)\n# vex-vision-config:end\nmotor_6 = Motor(Ports.PORT6, GearSetting.RATIO_18_1, False)\n\n\n# wait for rotation sensor to fully initialize\nwait(30, MSEC)\n#endregion VEXcode Generated Robot Configuration\n\n\n# ------------------------------------------\n# \n# \tProject: VEXcode Project\n#\tAuthor: VEX\n#\tCreated:\n#\tDescription: VEXcode V5 Python Project\n# \n# ------------------------------------------\n\n\n# Library imports\nfrom vex import *\n\nbrain.screen.print(\"hello world\")\n\nwhile True:\n brain.screen.clear_screen()\n brain.screen.set_cursor(1, 1)\n\n vision_object = vision_11.take_snapshot(vision_11__BLUE_)\n brain.screen.print(vision_object)\n vision_object = vision_11.take_snapshot(vision_11__RED_)\n brain.screen.print(vision_object)\n wait(1, SECONDS)","textLanguage":"python","rconfig":[{"port":[],"name":"controller_1","customName":false,"deviceType":"Controller","deviceClass":"controller","setting":{"left":"","leftDir":"false","right":"","rightDir":"false","upDown":"","upDownDir":"false","xB":"","xBDir":"false","drive":"none","id":"primary"},"triportSourcePort":22},{"port":[1],"name":"motor_1","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1","id":"partner"},"triportSourcePort":22},{"port":[2],"name":"motor_2","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1","id":"partner"},"triportSourcePort":22},{"port":[3],"name":"motor_3","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1","id":"partner"},"triportSourcePort":22},{"port":[4],"name":"motor_4","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio36_1"},"triportSourcePort":22},{"port":[5],"name":"motor_5","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1","id":"partner"},"triportSourcePort":22},{"port":[11],"name":"vision_11","customName":false,"deviceType":"Vision","deviceClass":"vision","setting":{"config":"{\"config\":{\"brightness\":50,\"signatures\":[{\"name\":\"BLUE_\",\"parameters\":{\"uMin\":579,\"uMax\":929,\"uMean\":754,\"vMin\":-527,\"vMax\":-127,\"vMean\":-326,\"rgb\":6774877,\"type\":0,\"name\":\"BLUE_\"},\"range\":2.1},{\"name\":\"RED_\",\"parameters\":{\"uMin\":9401,\"uMax\":9831,\"uMean\":9616,\"vMin\":-2791,\"vMax\":-2629,\"vMean\":-2710,\"rgb\":12934464,\"type\":0,\"name\":\"RED_\"},\"range\":8.9},{\"name\":\"R2\",\"parameters\":{\"uMin\":0,\"uMax\":0,\"uMean\":0,\"vMin\":0,\"vMax\":0,\"vMean\":0,\"rgb\":0,\"type\":0,\"name\":\"R2\"},\"range\":3},{\"name\":\"SIG_4\",\"parameters\":{\"uMin\":0,\"uMax\":0,\"uMean\":0,\"vMin\":0,\"vMax\":0,\"vMean\":0,\"rgb\":0,\"type\":0,\"name\":\"SIG_4\"},\"range\":2.5},{\"name\":\"SIG_5\",\"parameters\":{\"uMin\":0,\"uMax\":0,\"uMean\":0,\"vMin\":0,\"vMax\":0,\"vMean\":0,\"rgb\":0,\"type\":0,\"name\":\"SIG_5\"},\"range\":2.5},{\"name\":\"SIG_6\",\"parameters\":{\"uMin\":0,\"uMax\":0,\"uMean\":0,\"vMin\":0,\"vMax\":0,\"vMean\":0,\"rgb\":0,\"type\":0,\"name\":\"SIG_6\"},\"range\":2.5},{\"name\":\"SIG_7\",\"parameters\":{\"uMin\":0,\"uMax\":0,\"uMean\":0,\"vMin\":0,\"vMax\":0,\"vMean\":0,\"rgb\":0,\"type\":0,\"name\":\"SIG_7\"},\"range\":2.5}],\"codes\":[]}}","isConfigured":"false"},"triportSourcePort":22},{"port":[6],"name":"motor_6","customName":false,"deviceType":"Motor","deviceClass":"motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1","id":"partner"}}],"slot":0,"platform":"V5","sdkVersion":"20220726.10.00.00","appVersion":"2.4.0","minVersion":"2.4.0","fileFormat":"1.2.0","icon":"","targetBrainGen":"First","target":"Physical"}