lunes, 20 de enero de 2020
domingo, 19 de enero de 2020
martes, 14 de enero de 2020
LISTA DE COTEJO DEL SIGUELÍNEAS
Para realizar el proyecto tenemos que seguir estas tareas ordenadas:
1. Planificar: Revisar la documentación, elaborar la lista de cotejo, realizar el diseño con el despiece y la lista de materiales y herramientas y el reparto de las tareas.
2. Los cuatro grupos dibujan sobre el panel las piezas, las recortan y decidimos con cuál nos quedamos (la que encaje mejor).
3. Montar la IR Array y probarla.
4. Montar el resto del circuito.
5. Descargar Arduino.
6. Diseñar el programa del coche: Elaborar un diagrama de flujo
7. Escribir el programa en el lenguaje de programación Arduino.
8. Cargarlo a la placa.
9. Verificar.
10. Unir todo y A JUGAR!!!!
1. Planificar: Revisar la documentación, elaborar la lista de cotejo, realizar el diseño con el despiece y la lista de materiales y herramientas y el reparto de las tareas.
2. Los cuatro grupos dibujan sobre el panel las piezas, las recortan y decidimos con cuál nos quedamos (la que encaje mejor).
3. Montar la IR Array y probarla.
4. Montar el resto del circuito.
5. Descargar Arduino.
6. Diseñar el programa del coche: Elaborar un diagrama de flujo
7. Escribir el programa en el lenguaje de programación Arduino.
8. Cargarlo a la placa.
9. Verificar.
10. Unir todo y A JUGAR!!!!
viernes, 10 de enero de 2020
PROBAR LA IR ARRAY
The IR Array consists of 3 IR (Infrared) sensors. Look closely and you will see that each sensor has two ‘dots’, one blue and one black. The blue one is an IR LED and the black one is the actual IR sensor. When connected to power, the IR LED emits infrared
light. You can not see it with your own eyes but if you have a camera in your mobile phone you can direct it towards the LED and on the mobile screen you will see the IR light very clearly. When you hold the sensors close to a white surface, the white
surface will reflect a lot of the IR light emitted by the LED, which will be detected by the IR sensor. If you hold it over a black surface, instead almost no IR light will be reflected. This is how it can distinguish black from white.
Materials
- 1 x control board
- 1 x Education Shield
- 1 x IR Array
- 5 x jumper wire
Instructions
Step 1
Step 2
Step 3
IR Array 6 pin
IR Array 10 pin
- Attach the shield onto the top of the board.
- Connect AN1 to A1, AN2 to A2 and AN3 to A3.
- Connect the IR Arrays GND to GND and VCC to power.
- Connect the board to the computer and upload example ‘IRArray’.
Code
Find the code in File>Examples>EducationShield>Help>IRArrayhttp://verkstad.cc/urler/ctc-g-r-21
Result
You should now open the serial monitor and move the IRArray over a black or white surface. If a sensor is over a black surface, a value around 330 should be printed, if over a white surface, the value should be around 400.Commands
- IRArray( AN1, AN2, AN3 ): Creates an IRArray object
- Parameters
- (int) AN1: the analog pin to which the first IR sensor is connected to.
- (int) AN2: the analog pin to which the second IR sensor is connected to.
-
(int) AN3: the analog pin to which the third IR sensor is connected to.
- Parameters
-
test(): prints all the IR sensor readings to the serial monitor.
- setThreshold(threshold): Sets the threshold value between black and white. Use test() first to check the readings from black and white, then decide on a threshold value between those values.
- Parameters
- (int) threshold: The threshold value between black and white. If you’re using the CTC 101 board the threshold is 530, if you’re using the CTC UNO board its 380.
- Parameters
- readLine(): returns the direction of a black line on a white surface.
- Return
-
(int): Value between -100 to 100. When it is close to 0, the IR array is in middle of the black line. When it is close to -100 or 100, it is offset to the sides.
-
- Return
- readBinary(): Returns the decimal value combined from the individual IR sensor readings.
- Return
-
(int): A value between 0 and 7. See table below for the value representation.
-
- Return
Troubleshooting
- Make sure the connections between the IR Array, wires and board are correct.
- If you move IR1 from black to white but only the value of IR2 is changed, you need to either change the analog pins in the code or change the connections to the analog pins on the board.
Suscribirse a:
Entradas (Atom)