![Page 1: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/1.jpg)
Cafeteros Cocorocó@CafeterosIV
![Page 2: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/2.jpg)
ÍndiceEl equipo!
El problema!
La solución!
Conexión con la cafetera!
Programación de la Raspberry Pi!
Aprovisionamiento!
Análisis del estado!
Archivo de estado!
JSON resultado!
Aplicación web!
Problemas!
Ideas para el futuro
![Page 3: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/3.jpg)
El equipoJavier Collado Fran Ruíz Sergio Muñoz Antonio Guirola José Colella
![Page 4: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/4.jpg)
El problemaEl usuario necesita verificar el estado de sus máquinas de cafe´, para ello tiene que desplazarse hasta donde se encuentren.
![Page 5: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/5.jpg)
Ineficiente
![Page 7: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/7.jpg)
Prototipo
![Page 8: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/8.jpg)
Prototipo x2
![Page 9: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/9.jpg)
Conexión con la cafetera
![Page 10: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/10.jpg)
Programación de la Raspberry Pi
Instalar paquetes necesarios:!
Rpi.GPIO!
Python - pip!
MySQL-Client!
Rhc (OpenShift)!
Desplegar scripts necesarios desde GitHub!
Programar ejecución de los scripts!
Ansible Playbook
![Page 11: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/11.jpg)
Playbook - Aprovisionamiento
![Page 12: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/12.jpg)
Diagrama de funcionamiento
Generar secuencia!
de botones
Leer del!puerto serie y!
generar archivo de
texto
Parsear archivo!y enviar a la
BD
![Page 13: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/13.jpg)
Vídeo
![Page 14: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/14.jpg)
Archivo de estado
Este archivo se parsea y se!
envía la información a la base!
de datos MySQL alojada !
en OpenShift
![Page 15: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/15.jpg)
Archivo JSON
![Page 16: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/16.jpg)
Envío de datos al servidor
Raspberry Pi se conecta al servidor MySQL en OpenShift!
Es necesario hacer un port forwarding desde la Raspberry Pi
![Page 17: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/17.jpg)
Aplicación webhttp://cafeteros-cocoroco.rhcloud.com/"
Interfaz responsiva (Bootstrap)!Diseño sencillo y directo!Secciones de estado y !
mantenimiento
![Page 18: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/18.jpg)
Aplicación web
![Page 19: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/19.jpg)
Aplicación web
![Page 20: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/20.jpg)
Problemas encontrados
El voltaje de actuación de los relés!
Lectura del puerto serie en la Raspberry Pi, comportamiento inexplicable!
¡No podemos comprar en sábado y domingo!!
¿Y nuestro café gratis?
![Page 21: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/21.jpg)
Ideas para el futuro
Que funcione del todo!
Diseñar la placa y hacer las conexiones correctamente!
Utilizar los pines del puerto serie en lugar de un conversor!
Poder resetear la máquina desde la Raspberry Pi (añadir un relé para 220V)!
Gestión para todos los botones!
Enviar órdenes a la Raspberry (no solo el cron). Limpiar la máquina, generar estadísticas, etc…!
Poder pagar los cafés con Paypal y ordenarlos vía web (muy hipster…)!
Integrar la circuitería dentro de la máquina
![Page 22: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/22.jpg)
Preguntas
![Page 23: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/23.jpg)
¡Gracias!
![Page 24: Práctica 4 IV/DAI: Presentación Cafeteros Cocorocó](https://reader035.vdocuments.mx/reader035/viewer/2022081401/559652301a28abda598b45cf/html5/thumbnails/24.jpg)
Imágenes tomadas de:http://www.granadadirect.com/granada/mapa/!
http://www.iconarchive.com/show/office-space-icons-by-visualpharm/coffee-machine-icon.html!
http://philly2600.net/wp-content/uploads/2013/09/pi1l.jpg!
http://icons.mysitemyway.com/legacy-icon/088795-yellow-road-sign-icon-business-globe/!
http://www.pctux.com.ar/wp-content/uploads/2013/06/openshift_logo.png!
http://formaciononline.co/wp-content/uploads/2013/08/php-mysql1.gif!
http://alanchavez.com/si-eres-desarrollador-web-debes-utilizar-bootstrap-y-punto/!
http://betanews.com/2012/09/27/pc-is-no-longer-personal-computer/!