msgid "" msgstr "" "Project-Id-Version:Tecno Recursos 2023" "Report-Msgid-Bugs-To:" "POT-Creation-Date:2023-02-07 18:33+0100" "PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE" "Last-Translator:FULL NAME " "Language:en" "Language-Team:en " "Plural-Forms:nplurals=2; plural=(n != 1)" "MIME-Version:1.0" "Content-Type:text/plain; charset=utf-8" "Content-Transfer-Encoding:8bit" "Generated-By:Babel 2.9.0" #: ../../es/arduprog/pc42-key1.rst:13 msgid "Pulsadores y Estados" msgstr "Buttons and States" #: ../../es/arduprog/pc42-key1.rst:31 msgid "Objetivos" msgstr "Goals" #: ../../es/arduprog/pc42-key1.rst:32 msgid "Leer el estado de un pulsador." msgstr "Read the status of a button." #: ../../es/arduprog/pc42-key1.rst:33 msgid "Programar Arduino para que responda a las pulsaciones del usuario." msgstr "Program Arduino to respond to user keystrokes." #: ../../es/arduprog/pc42-key1.rst:37 msgid "Pulsadores del panel de control PC42" msgstr "PC42 control panel pushbuttons" #: ../../es/arduprog/pc42-key1.rst:38 msgid "" "El panel PC42 dispone de un teclado con seis pulsadores. Cada pulsador se " "identifica con un número o con una constante que lleva su nombre. El nombre " "de cada pulsador puede verse en la serigrafía del circuito impreso. Las seis" " constantes y números que representan a los pulsadores son los siguientes." msgstr "" "The PC42 panel has a keyboard with six buttons. Each button is identified " "with a number or a constant that bears its name. The name of each button can" " be seen on the screen printing of the printed circuit. The six constants " "and numbers that represent the buttons are as follows." #: ../../es/arduprog/pc42-key1.rst:47 msgid "Constante" msgstr "Constant" #: ../../es/arduprog/pc42-key1.rst:47 msgid "Pulsador" msgstr "Button" #: ../../es/arduprog/pc42-key1.rst:49 ../../es/arduprog/pc42-key1.rst:102 msgid "KEY_LEFT" msgstr "KEY_LEFT" #: ../../es/arduprog/pc42-key1.rst:49 ../../es/arduprog/pc42-key1.rst:102 msgid "1" msgstr "1" #: ../../es/arduprog/pc42-key1.rst:51 ../../es/arduprog/pc42-key1.rst:104 msgid "KEY_RIGHT" msgstr "KEY_RIGHT" #: ../../es/arduprog/pc42-key1.rst:51 ../../es/arduprog/pc42-key1.rst:104 msgid "2" msgstr "2" #: ../../es/arduprog/pc42-key1.rst:53 ../../es/arduprog/pc42-key1.rst:106 msgid "KEY_DOWN" msgstr "KEY_DOWN" #: ../../es/arduprog/pc42-key1.rst:53 msgid "3" msgstr "3" #: ../../es/arduprog/pc42-key1.rst:55 ../../es/arduprog/pc42-key1.rst:108 msgid "KEY_UP" msgstr "KEY_UP" #: ../../es/arduprog/pc42-key1.rst:55 ../../es/arduprog/pc42-key1.rst:106 msgid "4" msgstr "4" #: ../../es/arduprog/pc42-key1.rst:57 ../../es/arduprog/pc42-key1.rst:110 msgid "KEY_ENTER" msgstr "KEY_ENTER" #: ../../es/arduprog/pc42-key1.rst:57 msgid "5" msgstr "5" #: ../../es/arduprog/pc42-key1.rst:59 ../../es/arduprog/pc42-key1.rst:112 msgid "KEY_BACK" msgstr "KEY_BACK" #: ../../es/arduprog/pc42-key1.rst:59 msgid "6" msgstr "6" #: ../../es/arduprog/pc42-key1.rst:62 msgid "El número de pulsador se representará en este manual como ``keyNum``." msgstr "The key number will be represented in this manual as ``keyNum``." #: ../../es/arduprog/pc42-key1.rst:66 msgid "La función :cpp:func:`keyPressed`" msgstr "The :cpp:func:`keyPressed` function" #: ../../es/arduprog/pc42-key1.rst:70 msgid "" "Esta función devuelve el valor de un pulsador. Devuelve el valor 1 si el " "pulsador está presionado y 0 si no lo está. El valor de esta función filtra " "el ruido eléctrico y los rebotes." msgstr "" "This function returns the value of a button. Returns the value 1 if the " "button is pressed and 0 if it is not. The value of this function filters out" " electrical noise and bounce." #: ../../es/arduprog/pc42-key1.rst:75 msgid "" "El **ruido eléctrico** son interferencias asociadas a los motores " "eléctricos, a los interruptores, a las modernas lámparas de bajo consumo o a" " los teléfonos móviles. Cualquiera de estos aparatos puede provocar que " "durante un breve momento un pulsador parezca estar presionado aunque no sea " "cierto. Es muy recomendable filtrar este ruido para evitar pulsaciones " "'falsas' o 'fantasmas'." msgstr "" "**Electrical noise** is interference associated with electric motors, " "switches, modern energy-saving lamps or mobile phones. Any of these devices " "can cause a button to appear to be pressed for a brief moment even though it" " is not. It is highly recommended to filter this noise to avoid 'false' or " "'ghost' keystrokes." #: ../../es/arduprog/pc42-key1.rst:84 msgid "" "Los rebotes son un fenómeno que provoca que el pulsador no haga contacto " "durante un periodo corto de tiempo, unos milisegundos, justo después de " "presionarle porque la chapa metálica 'rebota' y deja de hacer contacto. Este" " fenómeno puede provocar que se interprete una pulsación como dos " "pulsaciones, por lo que es recomendable que se filtre para eliminarlo." msgstr "" "Bouncing is a phenomenon that causes the push button to not make contact for" " a short period of time, a few milliseconds, right after it is pressed " "because the sheet metal 'bounces' and stops making contact. This phenomenon " "can cause one click to be interpreted as two clicks, so it is recommended " "that you filter it to eliminate it." #: ../../es/arduprog/pc42-key1.rst:91 msgid "" "La desventaja de este filtro de ruido consiste en que esta función tiene un " "retardo de 20 milisegundos en responder desde que cambia el estado real del " "pulsador hasta que devuelve el valor correcto." msgstr "" "The disadvantage of this noise filter is that this function has a 20 " "millisecond delay in responding from when the actual state of the switch " "changes to when it returns the correct value." #: ../../es/arduprog/pc42-key1.rst:95 msgid "" "Si se utiliza el argumento ``KEY_ALL``, la función devuelve un número que " "depende de la suma de los pulsadores que se encuentren presionados." msgstr "" "If the ``KEY_ALL`` argument is used, the function returns a number that " "depends on the sum of the keys that are pressed." #: ../../es/arduprog/pc42-key1.rst:100 msgid "Pulsador presionado" msgstr "Button pressed" #: ../../es/arduprog/pc42-key1.rst:100 msgid "Valor devuelto" msgstr "Return value" #: ../../es/arduprog/pc42-key1.rst:100 msgid "Valor devuelto (binario)" msgstr "Return value (binary)" #: ../../es/arduprog/pc42-key1.rst:102 msgid "0b000001" msgstr "0b000001" #: ../../es/arduprog/pc42-key1.rst:104 msgid "0b000010" msgstr "0b000010" #: ../../es/arduprog/pc42-key1.rst:106 msgid "0b000100" msgstr "0b000100" #: ../../es/arduprog/pc42-key1.rst:108 msgid "8" msgstr "8" #: ../../es/arduprog/pc42-key1.rst:108 msgid "0b001000" msgstr "0b001000" #: ../../es/arduprog/pc42-key1.rst:110 msgid "16" msgstr "16" #: ../../es/arduprog/pc42-key1.rst:110 msgid "0b010000" msgstr "0b010000" #: ../../es/arduprog/pc42-key1.rst:112 msgid "32" msgstr "32" #: ../../es/arduprog/pc42-key1.rst:112 msgid "0b100000" msgstr "0b100000" #: ../../es/arduprog/pc42-key1.rst:115 msgid "" "Si se encuentra presionado el pulsador 4, la función devolverá el valor 8. " "Con el pulsador 6 presionado, la función devolverá el valor 32. Si se " "presionan los dos pulsadores 4 y 6 a la vez, la función devolverá la suma de" " 8 y 32, es decir 40." msgstr "" "If button 4 is pressed, the function will return the value 8. With button 6 " "pressed, the function will return the value 32. If both buttons 4 and 6 are " "pressed at the same time, the function will return the sum of 8 and 32 i.e. " "40." #: ../../es/arduprog/pc42-key1.rst:119 ../../es/arduprog/pc42-key1.rst:223 msgid "|keyNum|" msgstr "|keyNum|" #: ../../es/arduprog/pc42-key1.rst:121 ../../es/arduprog/pc42-key1.rst:225 msgid "|KEY_VALUES|" msgstr "|KEY_VALUES|" #: ../../es/arduprog/pc42-key1.rst:125 msgid "Encender un led con un pulsador" msgstr "Turn on a led with a button" #: ../../es/arduprog/pc42-key1.rst:127 msgid "" "El siguiente programa encenderá el led D1 cuando se presione el pulsador 1 " "(``KEY_LEFT``)" msgstr "" "The following program will turn on led D1 when button 1 is pressed " "(``KEY_LEFT``)" #: ../../es/arduprog/pc42-key1.rst:136 ../../es/arduprog/pc42-key1.rst:294 #: ../../es/arduprog/pc42-key1.rst:339 ../../es/arduprog/pc42-key1.rst:384 #: ../../es/arduprog/pc42-key1.rst:484 msgid "Programa equivalente en el entorno Ardublock:" msgstr "Equivalent program in the Ardublock environment:" #: ../../es/arduprog/pc42-key1.rst:143 msgid "" "En este enlace se puede descargar el :download:`archivo de programa para " "entorno Ardublock 'keyPressed' <_downloads/ardublock_keyPressed.abp>`" msgstr "" "In this link you can download the :download:`program file for Ardublock " "environment 'keyPressed' <_downloads/ardublock_keyPressed.abp>`" #: ../../es/arduprog/pc42-key1.rst:149 msgid "Apagar un led con un pulsador" msgstr "Turn off a led with a button" #: ../../es/arduprog/pc42-key1.rst:151 msgid "" "El siguiente programa realizará la función contraria al anterior, apagará el" " led D1 cuando se presione el pulsador 1 (``KEY_LEFT``)" msgstr "" "The following program will perform the opposite function to the previous " "one, it will turn off led D1 when button 1 is pressed (``KEY_LEFT``)" #: ../../es/arduprog/pc42-key1.rst:160 msgid "" "El lenguaje de Arduino permite escribir la última función del programa " "anterior de muchas otras formas. Estas son algunas alternativas que " "consiguen el mismo resultado." msgstr "" "The Arduino language allows you to write the last function of the above " "program in many other ways. These are some alternatives that achieve the " "same result." #: ../../es/arduprog/pc42-key1.rst:184 msgid "" "Como se puede ver, el lenguaje de Arduino es muy rico en expresiones. " "Gracias a esto es un lenguaje muy potente y, a su vez, complejo de aprender." " Por esta razón en los ejemplos siguientes aparecerá el mínimo número de " "expresiones lógicas, para no complicar el aprendizaje." msgstr "" "As you can see, the Arduino language is very rich in expressions. Thanks to " "this it is a very powerful language and, in turn, complex to learn. For this" " reason, in the following examples the minimum number of logical expressions" " will appear, so as not to complicate learning." #: ../../es/arduprog/pc42-key1.rst:190 msgid "El programa equivalente en el entorno Ardublock resulta más sencillo:" msgstr "The equivalent program in the Ardublock environment is simpler:" #: ../../es/arduprog/pc42-key1.rst:198 msgid "" ":download:`Programa para entorno Ardublock: 'keyPressed_2' " "<_downloads/ardublock_keyPressed_2.abp>`" msgstr "" ":download:`Program for Ardublock environment: 'keyPressed_2' " "<_downloads/ardublock_keyPressed_2.abp>`" #: ../../es/arduprog/pc42-key1.rst:204 msgid "La función :cpp:func:`keyValue`" msgstr "The :cpp:func:`keyValue` function" #: ../../es/arduprog/pc42-key1.rst:208 msgid "" "Esta función es semejante a la función :cpp:func:`keyPressed` vista " "anteriormente. Devuelve el valor de un pulsador. Si el pulsador está " "presionado, devuelve el valor 1 si el pulsador no está presionado devuelve " "el valor 0. Esta función no filtra el ruido eléctrico como lo hace la " "función :cpp:func:`keyPressed`." msgstr "" "This function is similar to the :cpp:func:`keyPressed` function seen above. " "Returns the value of a button. If the key is pressed, it returns the value " "1; if the key is not pressed, it returns the value 0. This function does not" " filter out electrical noise like the :cpp:func:`keyPressed` function does." #: ../../es/arduprog/pc42-key1.rst:216 msgid "" "Esta función devuelve el estado actual del pulsador sin filtro y, por lo " "tanto, puede devolver valores falsos producidos por el ruido eléctrico o los" " rebotes." msgstr "" "This function returns the current state of the switch without a filter, and " "therefore can return false values ​​caused by electrical noise or bouncing." #: ../../es/arduprog/pc42-key1.rst:220 msgid "" "Como ventaja, esta función devuelve el valor del pulsador sin retraso de " "tiempo en la respuesta." msgstr "" "As an advantage, this function returns the value of the button without a " "time delay in the response." #: ../../es/arduprog/pc42-key1.rst:230 msgid "Ejercicios" msgstr "Exercises" #: ../../es/arduprog/pc42-key1.rst:231 msgid "Programa el código necesario para resolver los siguientes problemas." msgstr "Program the code needed to solve the following problems." #: ../../es/arduprog/pc42-key1.rst:233 msgid "" "Encender el led D1 con el pulsador 1 y apagar el led D1 con el pulsador 2. " "Corregir los errores sintácticos del siguiente programa. Los errores más " "comunes son: olvidar el punto y coma al final de la instrucción, cambiar " "mayúsculas y minúsculas, olvidar un corchete o paréntesis. Arduino ayuda a " "encontrar los errores de dos maneras. Al escribir una función correcta, esta" " aparece con un color naranja. Al compilar el código, la ventana inferior " "informa sobre los errores encontrados." msgstr "" "Turn on led D1 with button 1 and turn off led D1 with button 2. Correct the " "syntactic errors of the following program. The most common errors are: " "forgetting the semicolon at the end of the statement, changing case, " "forgetting a bracket or parenthesis. Arduino helps to find errors in two " "ways. When typing a successful function, it appears in orange. When " "compiling the code, the lower window informs about the errors found." #: ../../es/arduprog/pc42-key1.rst:262 msgid "" "Encender todos los leds de la siguiente manera. El led D1 se encenderá al " "presionar el pulsador 1. A continuación el led D2 se encenderá al presionar " "el pulsador 2. El programa seguirá de esta manera hasta llegar a encender 5 " "led. Completar el programa que aparece a continuación." msgstr "" "Turn on all the leds as follows. LED D1 will light up when button 1 is " "pressed. Then LED D2 will light up when button 2 is pressed. The program " "will continue in this way until 5 LEDs light up. Complete the program below." #: ../../es/arduprog/pc42-key1.rst:303 msgid "" ":download:`Programa para entorno Ardublock: 'keyPressed_3' " "<_downloads/ardublock_keyPressed_3.abp>`" msgstr "" ":download:`Program for Ardublock environment: 'keyPressed_3' " "<_downloads/ardublock_keyPressed_3.abp>`" #: ../../es/arduprog/pc42-key1.rst:306 msgid "" "Al comenzar, se encenderá el led D1. Cuando se presione el pulsador 1, se " "apagará el led D1 y se encenderá el led siguiente. La luz se moverá así " "hacia la derecha hasta el led D5. Al presionar el pulsador 5, el led D5 se " "apagará y se encenderá de nuevo el led led D1. Completar el programa que " "aparece a continuación según los comentarios." msgstr "" "When starting, led D1 will light up. When button 1 is pressed, led D1 will " "go out and the next led will light up. The light will thus move to the right" " up to led D5. By pressing button 5, LED D5 will turn off and LED D1 will " "turn on again. Complete the program below according to the comments." #: ../../es/arduprog/pc42-key1.rst:347 msgid "" ":download:`Programa para entorno Ardublock: 'keyPressed_4' " "<_downloads/ardublock_keyPressed_4.abp>`" msgstr "" ":download:`Program for Ardublock environment: 'keyPressed_4' " "<_downloads/ardublock_keyPressed_4.abp>`" #: ../../es/arduprog/pc42-key1.rst:351 msgid "" "Modificar el programa anterior para que los leds se enciendan desde el D6 " "hasta el D1. Cuando llegue el turno de apagar el led D1, se encenderá de " "nuevo el led D6." msgstr "" "Modify the previous program so that the leds light up from D6 to D1. When it" " is time to turn off led D1, led D6 will light up again." #: ../../es/arduprog/pc42-key1.rst:355 msgid "" "Los tres leds D1, D2 y D3 se encenderán cuando se presione a la vez los tres" " pulsadores 1, 2 y 3. Utiliza el operador '&&' que evalúa si se producen dos" " condiciones a la vez. Completar el programa que aparece a continuación " "según los comentarios." msgstr "" "The three leds D1, D2 and D3 will turn on when the three buttons 1, 2 and 3 " "are pressed at the same time. It uses the '&&' operator that evaluates if " "two conditions occur at the same time. Complete the program below according " "to the comments." #: ../../es/arduprog/pc42-key1.rst:392 msgid "" ":download:`Programa para entorno Ardublock: 'keyPressed_5' " "<_downloads/ardublock_keyPressed_5.abp>`" msgstr "" ":download:`Program for Ardublock environment: 'keyPressed_5' " "<_downloads/ardublock_keyPressed_5.abp>`" #: ../../es/arduprog/pc42-key1.rst:396 msgid "" "Después de presionar en orden la secuencia de pulsadores 2, 4 y 1, una " "cerradura electrónica se abrirá. La apertura se indicará encendiendo en " "secuencia los leds rojo, amarillo y verde, uno cada segundo. Completar los " "huecos del programa que aparece a continuación según los comentarios." msgstr "" "After pressing the sequence of buttons 2, 4 and 1 in order, an electronic " "lock will open. The opening will be indicated by turning on the red, yellow " "and green leds in sequence, one every second. Fill in the gaps in the " "program below according to the comments." #: ../../es/arduprog/pc42-key1.rst:492 msgid "" ":download:`Programa para entorno Ardublock: 'keyPressed_6' " "<_downloads/ardublock_keyPressed_6.abp>`" msgstr "" ":download:`Program for Ardublock environment: 'keyPressed_6' " "<_downloads/ardublock_keyPressed_6.abp>`"