Facebook
From Cocodrile tabasco, 1 Year ago, written in C++.
Embed
Download Paste or View Raw
Hits: 120
  1. #pragma region VEXcode Generated Robot Configuration
  2. // Make sure all required headers are included.
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <stdbool.h>
  6. #include <math.h>
  7. #include <string.h>
  8.  
  9.  
  10. #include "vex.h"
  11.  
  12. using namespace vex;
  13.  
  14. // Brain should be defined by default
  15. brain Brain;
  16.  
  17.  
  18. // START IQ MACROS
  19. #define waitUntil(condition)                                                   \
  20.   do {                                                                         \
  21.     wait(5, msec);                                                             \
  22.   } while (!(condition))
  23.  
  24. #define repeat(iterations)                                                     \
  25.   for (int iterator = 0; iterator < iterations; iterator++)
  26. // END IQ MACROS
  27.  
  28.  
  29. // Robot configuration code.
  30. controller Controller = controller();
  31. motor LeftDriveSmart = motor(PORT1, 0.5, false);
  32. motor RightDriveSmart = motor(PORT6, 0.5, true);
  33. drivetrain Drivetrain = drivetrain(LeftDriveSmart, RightDriveSmart, 200, 173, 76, mm, 1);
  34. motor Azul = motor(PORT5, false);
  35. motor Canasta = motor(PORT11, true);
  36. motor ShooterMotorA = motor(PORT4, false);
  37. motor ShooterMotorB = motor(PORT10, false);
  38. motor_group Shooter = motor_group(ShooterMotorA, ShooterMotorB);
  39.  
  40.  
  41.  
  42.  
  43. // define variable for remote controller enable/disable
  44. bool RemoteControlCodeEnabled = true;
  45. // define variables used for controlling motors based on controller inputs
  46. bool DrivetrainLNeedsToBeStopped_Controller = true;
  47. bool DrivetrainRNeedsToBeStopped_Controller = true;
  48.  
  49. // define a task that will handle monitoring inputs from Controller
  50. int rc_auto_loop_function_Controller() {
  51.   // process the controller input every 20 milliseconds
  52.   // update the motors based on the input values
  53.   while(true) {
  54.     if(RemoteControlCodeEnabled) {
  55.       // calculate the drivetrain motor velocities from the controller joystick axies
  56.       // left = AxisA
  57.       // right = AxisD
  58.       int drivetrainLeftSideSpeed = Controller.AxisA.position();
  59.       int drivetrainRightSideSpeed = Controller.AxisD.position();
  60.      
  61.       // check if the value is inside of the deadband range
  62.       if (drivetrainLeftSideSpeed < 5 && drivetrainLeftSideSpeed > -5) {
  63.         // check if the left motor has already been stopped
  64.         if (DrivetrainLNeedsToBeStopped_Controller) {
  65.           // stop the left drive motor
  66.           LeftDriveSmart.stop();
  67.           // tell the code that the left motor has been stopped
  68.           DrivetrainLNeedsToBeStopped_Controller = false;
  69.         }
  70.       } else {
  71.         // reset the toggle so that the deadband code knows to stop the left motor nexttime the input is in the deadband range
  72.         DrivetrainLNeedsToBeStopped_Controller = true;
  73.       }
  74.       // check if the value is inside of the deadband range
  75.       if (drivetrainRightSideSpeed < 5 && drivetrainRightSideSpeed > -5) {
  76.         // check if the right motor has already been stopped
  77.         if (DrivetrainRNeedsToBeStopped_Controller) {
  78.           // stop the right drive motor
  79.           RightDriveSmart.stop();
  80.           // tell the code that the right motor has been stopped
  81.           DrivetrainRNeedsToBeStopped_Controller = false;
  82.         }
  83.       } else {
  84.         // reset the toggle so that the deadband code knows to stop the right motor next time the input is in the deadband range
  85.         DrivetrainRNeedsToBeStopped_Controller = true;
  86.       }
  87.      
  88.       // only tell the left drive motor to spin if the values are not in the deadband range
  89.       if (DrivetrainLNeedsToBeStopped_Controller) {
  90.         LeftDriveSmart.setVelocity(drivetrainLeftSideSpeed, percent);
  91.         LeftDriveSmart.spin(forward);
  92.       }
  93.       // only tell the right drive motor to spin if the values are not in the deadband range
  94.       if (DrivetrainRNeedsToBeStopped_Controller) {
  95.         RightDriveSmart.setVelocity(drivetrainRightSideSpeed, percent);
  96.         RightDriveSmart.spin(forward);
  97.       }
  98.     }
  99.     // wait before repeating the process
  100.     wait(20, msec);
  101.   }
  102.   return 0;
  103. }
  104.  
  105. task rc_auto_loop_task_Controller(rc_auto_loop_function_Controller);
  106. #pragma endregion VEXcode Generated Robot Configuration
  107.  
  108. #include "vex.h"
  109. #include "iq_cpp.h"
  110.  
  111. using namespace vex;
  112.  
  113. //                                                                            
  114. //----------------------------------------------------------------------------
  115. //    Modulo:      Cocodrile tabasco 2
  116. //    Ver:         "2.7"                                            
  117. //    Autor:       Daniel de "programming team"                                              
  118. //    Fecha dev:   1/11/2022-12/12/2022                                                  
  119. //    Descripcion: Programacion del reto 2022-2023 VEX IQ Slapshot                                            
  120. //                                                                            
  121. //----------------------------------------------------------------------------
  122.  
  123. //ChangeLog ( c++ ver)
  124. //----------------------------------------------------------------------------
  125. //2.2 se remasterizo desde cero la programacion en c++
  126. //2.3 Se removieron los comentarios por defecto y se agregaron unos mas acertados
  127. //2.4: Se agrego soporte para Autonumus skills
  128. //2.5: Se agrego soporte para la nueva version del robot
  129. //2.5.1: Se corrigieron los errores del motor del dispensador azul
  130. //2.6 Se agregaron MAS comentarios y se removieron los touch leds
  131. //2.6.1 Se acomodo algo mas la programacion y se corrigieron algunos bucles
  132. //!! 2.6.2-3 no se registraron debido a algunos errores
  133. //2.6.4 Se agrego un temporizador y un modo pinch (Un endGame)
  134. //2.6.5 Removidas varias lineas innecesarias
  135. //2.7.0 Se agrego compatibilidad con el nuevo robot
  136. //
  137. //----------------------------------------------------------------------------
  138.  
  139.  
  140. //----- C O D I G O  D E L  P R O Y E C T O -----//
  141.  
  142.  
  143. //Se definen algunas variables, bloques y funciones
  144. void myblockfunction_slot_nombre_en_row_column(double myblockfunction_slot_nombre_en_row_column__row, double myblockfunction_slot_nombre_en_row_column__column);
  145.  
  146. void myblockfunction_Slot_vacio();
  147.  
  148. void myblockfunction_sonido();
  149. //Todo lo anteior son "defines" para funciones
  150. int Brain_precision = 0;//Calidad del brain
  151.  
  152. float contador, selector, On_, Off_, Control_, MenuEnd, Tiempo_, DPS_; //Variables
  153.  
  154. event mensaje1 = event();
  155. event Menu = event();
  156. event Driver = event();
  157. event Autonumus = event();
  158. event Slot3 = event();
  159. event Slot4 = event();
  160. event Slot5 = event();
  161. event RGB1 = event();
  162. event RGB2 = event();
  163. event JB = event();
  164. event Tiempo = event();
  165. event pinch = event();
  166.  
  167. //Partes de las funciones
  168.  
  169. //Este bloque le da un funcionamiento a los slots llenos
  170. void myblockfunction_slot_nombre_en_row_column(double myblockfunction_slot_nombre_en_row_column__row, double myblockfunction_slot_nombre_en_row_column__column) {
  171.   MenuEnd = On_;
  172.   RGB1.broadcast();
  173.   Brain.Screen.clearScreen();
  174.   Brain.Screen.setCursor(myblockfunction_slot_nombre_en_row_column__row, myblockfunction_slot_nombre_en_row_column__column);
  175. }
  176.  
  177.  
  178. // Este bloque sirve para darle un funcionamiento a los slots vacios
  179. void myblockfunction_Slot_vacio() {
  180.   MenuEnd =  On_;
  181.   Brain.Screen.clearScreen();
  182.   Brain.Screen.setCursor(3, 9);
  183.   Brain.playSound(doorClose);
  184.   Brain.Screen.print(". ");
  185.   wait(0.3, seconds);
  186.   Brain.playSound(doorClose);
  187.   Brain.Screen.print(". ");
  188.   wait(0.3, seconds);
  189.   Brain.playSound(doorClose);
  190.   Brain.Screen.print(".");
  191.   wait(0.3, seconds);
  192.   Brain.Screen.clearScreen();
  193.   Brain.Screen.setCursor(1, 1);
  194.   MenuEnd = Off_;
  195.   Menu.broadcast();
  196. }
  197.  
  198. //Este es solamente estetico
  199. void myblockfunction_sonido() {
  200.   Brain.playSound(doorClose);
  201.   wait(0.3, seconds);
  202. }
  203.  
  204.  
  205. //Bloque inicial, se definen las velocidades, valores, etc
  206. int whenStarted1() {
  207.   RemoteControlCodeEnabled = false;
  208.   Canasta.setMaxTorque(100.0, percent);
  209.   Canasta.setVelocity(100.0, percent);
  210.   Shooter.setMaxTorque(100.0, percent);
  211.   Shooter.setVelocity(100.0, percent);
  212.   Azul.setMaxTorque(100.0, percent);
  213.   Azul.setVelocity(100.0, percent); //todas las velocidaded y torques son igual a 100
  214.  Drivetrain.setDriveVelocity(100,percent);
  215.   Azul.setStopping(hold);
  216.   Canasta.setStopping(hold);
  217.   Shooter.setStopping(hold);   //Los motores se quedan manteniendo fuerza al detenerse
  218.   Azul.stop();
  219. Shooter.stop();
  220. Canasta.stop() ;
  221. Drivetrain.stop(); //Se corrige un error en el cual el robot comienza a moverse solo
  222.   selector = 1.0;
  223.   contador = 1.0;//bases para el menu
  224.   Off_ = 5.0;
  225.   On_ = 10.0;   //on y off, para activar/desactivar slots y el menu
  226.   Tiempo_ = 60; //Contador para el cerebro
  227.   Control_ = Off_;   //para un refuerzo al drive block
  228.   MenuEnd = Off_;  //El menu NO ha terminado
  229.   DPS_ = 0.7;  //Delay entre cambio de leds
  230.   Menu.broadcast(); //Iniciar el menu
  231.   return 0;
  232. }
  233.  
  234. //Bloques led
  235. void onevent_RGB1_0() {
  236.   RGB2.broadcast();
  237.   /*
  238.   TouchLED9.setFade(slow);
  239.   TouchLED9.setBrightness(100);
  240.   while (true) {
  241.     wait(DPS_, seconds);
  242.     TouchLED9.setColor(red);
  243.     wait(DPS_, seconds);
  244.     TouchLED9.setColor(red_orange);
  245.     wait(DPS_, seconds);
  246.     TouchLED9.setColor(orange);
  247.     wait(DPS_, seconds);
  248.     TouchLED9.setColor(yellow);
  249.     wait(DPS_, seconds);
  250.     TouchLED9.setColor(yellow_green);
  251.     wait(DPS_, seconds);
  252.     TouchLED9.setColor(green);
  253.     wait(DPS_, seconds);
  254.     TouchLED9.setColor(blue_green);
  255.     wait(DPS_, seconds);
  256.     TouchLED9.setColor(blue);
  257.     wait(DPS_, seconds);
  258.     TouchLED9.setColor(blue_violet);
  259.     wait(DPS_, seconds);
  260.     TouchLED9.setColor(purple);
  261.     wait(DPS_, seconds);
  262.     TouchLED9.setColor(violet);
  263.     wait(DPS_, seconds);
  264.     TouchLED9.setColor(red_violet);
  265.   wait(20, msec);
  266.   */
  267.   }
  268. //}
  269.  
  270. //Lo mismo que en la parte de arriba, pero con el segundo led
  271. void onevent_RGB2_0() {
  272.   /*
  273.   TouchLED10.setFade(slow);
  274.   TouchLED10.setBrightness(100);
  275.   while (true) {
  276.     wait(DPS_, seconds);
  277.     TouchLED10.setColor(red);
  278.     wait(DPS_, seconds);
  279.     TouchLED10.setColor(red_orange);
  280.     wait(DPS_, seconds);
  281.     TouchLED10.setColor(orange);
  282.     wait(DPS_, seconds);
  283.     TouchLED10.setColor(yellow);
  284.     wait(DPS_, seconds);
  285.     TouchLED10.setColor(yellow_green);
  286.     wait(DPS_, seconds);
  287.     TouchLED10.setColor(green);
  288.     wait(DPS_, seconds);
  289.     TouchLED10.setColor(blue_green);
  290.     wait(DPS_, seconds);
  291.     TouchLED10.setColor(blue);
  292.     wait(DPS_, seconds);
  293.     TouchLED10.setColor(blue_violet);
  294.     wait(DPS_, seconds);
  295.     TouchLED10.setColor(purple);
  296.     wait(DPS_, seconds);
  297.     TouchLED10.setColor(violet);
  298.     wait(DPS_, seconds);
  299.     TouchLED10.setColor(red_violet);
  300.   wait(20, msec);
  301.   */
  302. //inutilizado por ahora
  303.  
  304.   }
  305.  
  306. void onevent_Tiempo_0(){ //Reloj
  307.   Brain.Screen.newLine();
  308. for (int i = 0; i <= 45; i++) {
  309.   Brain.Screen.setCursor(Brain.Screen.row(),1);
  310. Brain.Screen.print("         ");
  311. Brain.Screen.print("Tiempo_");
  312.   wait(1,seconds);
  313.   Tiempo_ = Tiempo_ - 1;
  314.   Brain.Screen.clearLine(Brain.Screen.row());
  315.   if (Tiempo_ == 15){
  316. pinch.broadcastAndWait();
  317.   }
  318. }
  319. }
  320. void onevent_pinch_0(){
  321.   Brain.playSound(alarm);
  322.   for (int i = 0; i <= 15; i++) {
  323.    Brain.playSound(doorClose);
  324.    wait(1,seconds);
  325.   }
  326.   Brain.playSound(powerDown);
  327. }
  328.  
  329. void onevent_JB_0(){
  330.   Brain.playNote(3, 2, 250);
  331.   Brain.playNote(3, 2, 250);
  332.   Brain.playNote(3, 2, 500);
  333.   Brain.playNote(3, 2, 250);
  334.   Brain.playNote(3, 2, 250);
  335.   Brain.playNote(3, 2, 500);
  336.   Brain.playNote(3, 2, 250);
  337.   Brain.playNote(3, 4, 250);
  338.   Brain.playNote(3, 0, 250);
  339.   Brain.playNote(3, 1, 250);
  340.   Brain.playNote(3, 2, 1000);
  341. }
  342.  
  343. //----- C O N T R O L E S -----
  344.  
  345. //Iniciar temporizador
  346. void onevent_ControllerButtonLDown_pressed_0(){
  347. if (Control_ == On_){
  348. while (!(!Controller.ButtonLDown.pressing())){
  349.   Tiempo.broadcast();
  350.   }
  351.  }
  352. }
  353.  
  354. //Moverse para acomodar los discos
  355. void onevent_ControllerButtonLUp_pressed_0(){
  356. if (Control_ == On_){
  357. while (!(!Controller.ButtonLUp.pressing())){
  358.   Drivetrain.driveFor(reverse,15,mm);
  359.   Drivetrain.driveFor(forward,15,mm);
  360.   }
  361.  }
  362. }
  363.  
  364. //Canasta, recibir
  365. void onevent_ControllerButtonRUp_pressed_0() {
  366.   if (Control_ == On_) {
  367.     while (!(!Controller.ButtonRUp.pressing())) {
  368.       Canasta.spin(forward);
  369.     wait(20, msec);
  370.     }
  371.     Canasta.stop();
  372.   }
  373. }
  374.  
  375. // Gancho, alzar
  376. void onevent_ControllerButtonEUp_pressed_0() {
  377.   if (Control_ == On_) {
  378.     while (!(!Controller.ButtonEUp.pressing())) {
  379.       Azul.spin(forward);
  380.     wait(20, msec);
  381.     }
  382.     Azul.stop();
  383.  }
  384. }
  385.  
  386. // Shooter, lanzar
  387. void onevent_ControllerButtonFUp_pressed_0() {
  388.   if (Control_ == On_) {
  389.     while (!(!Controller.ButtonFUp.pressing())) {
  390.       Shooter.spin(forward);
  391.     wait(20, msec);
  392.     }
  393.     Shooter.stop();
  394.  }
  395. }
  396.  
  397. //Canasta, enviar
  398. void onevent_ControllerButtonRDown_pressed_0() {
  399.   if (Control_ == On_) {
  400.     while (!(!Controller.ButtonRDown.pressing())) {
  401.       Canasta.spin(reverse);
  402.     wait(20, msec);
  403.     }
  404.     Canasta.stop();
  405.  }
  406. }
  407.  
  408. //Solo para no tener ningun inconveniente al conducir:
  409. // Shooter, x
  410. void onevent_ControllerButtonFDown_pressed_0() {
  411.   if (Control_ == On_) {
  412.     while (!(!Controller.ButtonFDown.pressing())) {
  413.       Shooter.spin(reverse);
  414.     wait(20, msec);
  415.     }
  416.     Shooter.stop();
  417.  }
  418. }
  419.  
  420. // Gancho, bajar
  421. void onevent_ControllerButtonEDown_pressed_0() {
  422.   if (Control_ == On_) {
  423.     while (!(!Controller.ButtonEDown.pressing())) {
  424.       Azul.spin(reverse);
  425.     wait(20, msec);
  426.  
  427.   }
  428.     Azul.stop();
  429.  
  430.  
  431.     //Controles listos
  432.   }
  433.   }
  434.  
  435.  
  436. // Esta parte es la mas importante
  437. //----- M E N U -----//
  438.  
  439. void onevent_buttonCheck_pressed_0() {
  440.   while (true){
  441.   if (MenuEnd == Off_) {
  442.     if (selector == 1.0) {
  443.       Driver.broadcastAndWait();
  444.     }
  445.     if (selector == 2.0) {
  446.       Autonumus.broadcast();
  447.     }
  448.     if (selector == 3.0) {
  449.       Slot3.broadcast();
  450.     }
  451.     if (selector == 4.0) {
  452.       Slot4.broadcast();
  453.     }
  454.     if (selector == 5.0) {
  455.       Slot5.broadcast();
  456.     }
  457.   }
  458. }
  459. }
  460. //
  461.  
  462. //Calidad al hacer print el el brain
  463. const char* printToBrain_numberFormat() {
  464.   switch(Brain_precision){
  465.     case 0:  return "%.0f"; // 0 decimal places (1)
  466.     case 1:  return "%.1f"; // 1 decimal place  (0.1)
  467.     case 2:  return "%.2f"; // 2 decimal places (0.01)
  468.     case 3:  return "%.3f"; // 3 decimal places (0.001)
  469.     default: return "%f"; // use the print system default for everthing else
  470.   }
  471. }
  472.  
  473. //Esta seccion se encarga de print-ear el menu (texto)
  474. void onevent_Menu_0() {
  475.   if (MenuEnd == Off_) {
  476.     while (!(MenuEnd == On_)) {
  477.       Brain.Screen.clearLine(contador);
  478.       if (selector == contador) {
  479.         Brain.Screen.print(">");
  480.       }
  481.    
  482.       Brain.Screen.print("Slot: ");
  483.       Brain.Screen.print(printToBrain_numberFormat(), static_cast<float>(contador));
  484.       contador = contador + 1.0;
  485.       if (contador > 5.0) {
  486.         contador = 1.0;
  487.       }
  488.       Brain.Screen.setCursor(contador, 1);
  489.     wait(20, msec);
  490.     }
  491.   }
  492. }
  493.  
  494.  
  495. void onevent_buttonUp_pressed_0() {
  496.   if (MenuEnd == Off_) {
  497.     Brain.playSound(doorClose);
  498.     if (selector > 1.0) {
  499.       selector = selector + -1.0;
  500.     }
  501.   }
  502. }
  503.  
  504. void onevent_buttonDown_pressed_0() {
  505.   if (MenuEnd == Off_) {
  506.     Brain.playSound(doorClose);
  507.     if (5.0 > selector) {
  508.       selector = selector + 1.0;
  509.     }
  510.   }
  511. }
  512.  
  513. //A partir de aqui se configuran las acciones de los slots
  514. // Driver
  515. void onevent_Driver_0() {
  516.   myblockfunction_slot_nombre_en_row_column(3.0, 7.0);
  517.     RemoteControlCodeEnabled = true;
  518.     Control_ = On_;
  519.   wait(0.3, seconds);
  520.   Tiempo.broadcast();
  521.   Brain.Screen.print("D");
  522.   myblockfunction_sonido();
  523.   Brain.Screen.print("r");
  524.   myblockfunction_sonido();
  525.   Brain.Screen.print("i");
  526.   myblockfunction_sonido();
  527.   Brain.Screen.print("v");
  528.   myblockfunction_sonido();
  529.   Brain.Screen.print("e");
  530.   myblockfunction_sonido();
  531.   Brain.Screen.print("r");
  532.   myblockfunction_sonido();
  533.   //Este efecto se repite con los diferentes slots
  534.  
  535. }
  536.  
  537. // Autonumus
  538.  
  539. void onevent_Autonumus_0() {
  540.   myblockfunction_slot_nombre_en_row_column(3.0, 6.0);
  541.   Brain.Screen.print("V");
  542.   myblockfunction_sonido();
  543.   Brain.Screen.print("i");
  544.   myblockfunction_sonido();
  545.   Brain.Screen.print("r");
  546.   myblockfunction_sonido();
  547.   Brain.Screen.print("t");
  548.   myblockfunction_sonido();
  549.   Brain.Screen.print("u");
  550.   myblockfunction_sonido();
  551.   Brain.Screen.print("a");
  552.   myblockfunction_sonido();
  553.   Brain.Screen.print("l");
  554.   myblockfunction_sonido();
  555.  
  556.   // !!
  557.   //waitUntil((TouchLED9.pressing() || TouchLED10.pressing()));
  558.   waitUntil (Brain.buttonCheck.pressing());  
  559.  Drivetrain.driveFor(forward,100,mm);
  560.  Drivetrain.turnFor(left,90,degrees);
  561.   }
  562.  
  563.  
  564. void onevent_Slot3_0() {
  565.   myblockfunction_Slot_vacio();
  566.  myblockfunction_slot_nombre_en_row_column(3.0,1.0);
  567.   Brain.Screen.print("J");
  568.   myblockfunction_sonido();
  569. Brain.Screen.print("i");
  570.   myblockfunction_sonido();
  571. Brain.Screen.print("n");
  572.   myblockfunction_sonido();
  573. Brain.Screen.print("g");
  574.   myblockfunction_sonido();
  575. Brain.Screen.print("l");
  576.   myblockfunction_sonido();
  577.   Brain.Screen.print("e");
  578.   myblockfunction_sonido();
  579.   Brain.Screen.print(" ");
  580.   myblockfunction_sonido();
  581.   Brain.Screen.print("b");
  582.   myblockfunction_sonido();
  583.   Brain.Screen.print("e");
  584.   myblockfunction_sonido();
  585.   Brain.Screen.print("l");
  586.   myblockfunction_sonido();
  587.   Brain.Screen.print("l");
  588.   myblockfunction_sonido();
  589.   Brain.Screen.print("s");
  590.   myblockfunction_sonido();
  591.   wait(1,seconds);
  592.   JB.broadcastAndWait();
  593. }
  594.  
  595. // Sin usar por el momento
  596. void onevent_Slot4_0() {
  597.   myblockfunction_Slot_vacio();
  598. }
  599.  
  600. // Sin usar por el momento
  601. void onevent_Slot5_0() {
  602.   myblockfunction_Slot_vacio();
  603. }
  604.  
  605. //Main, este define aun mas cosas para el correcto funcionamiento de la programacion
  606.  
  607. int main() {
  608.  
  609.   RGB1(onevent_RGB1_0);
  610.   RGB2(onevent_RGB2_0);
  611.   Controller.ButtonRUp.pressed(onevent_ControllerButtonRUp_pressed_0);
  612.   Controller.ButtonEUp.pressed(onevent_ControllerButtonRUp_pressed_0);
  613.   Controller.ButtonLUp.pressed(onevent_ControllerButtonEUp_pressed_0);
  614.   Controller.ButtonFUp.pressed(onevent_ControllerButtonFUp_pressed_0);
  615.   Controller.ButtonRDown.pressed(onevent_ControllerButtonRDown_pressed_0);
  616.   Controller.ButtonFDown.pressed(onevent_ControllerButtonFDown_pressed_0);
  617.   Controller.ButtonLDown.pressed(onevent_ControllerButtonEDown_pressed_0);
  618.   Controller.ButtonEDown.pressed(onevent_ControllerButtonEDown_pressed_0);
  619.   Brain.buttonCheck.pressed(onevent_buttonCheck_pressed_0);
  620.   Menu(onevent_Menu_0);
  621.   Brain.buttonUp.pressed(onevent_buttonUp_pressed_0);
  622.   Brain.buttonDown.pressed(onevent_buttonDown_pressed_0);
  623.   Driver(onevent_Driver_0);
  624.   Autonumus(onevent_Autonumus_0);
  625.   Slot3(onevent_Slot3_0);
  626.   Slot4(onevent_Slot4_0);
  627.   Slot5(onevent_Slot5_0);
  628.  
  629.   wait(15, msec);
  630.   whenStarted1();
  631. }