├── .docker └── jekyll │ └── Dockerfile ├── .gitignore ├── Gemfile ├── LICENSE ├── README.md ├── _config.yml ├── _includes ├── components │ ├── footer.html │ └── forkme.html ├── cover.html ├── session-1.html ├── session-2.html ├── session-3.html ├── session-4.html ├── session-5.html ├── session-6.html └── session-7.html ├── _layouts └── default.html ├── _sass ├── _murcia.scss ├── _reset.scss └── components │ ├── _footer.scss │ └── _forkme.scss ├── css └── main.scss ├── docker-compose.yml ├── favicon.ico ├── images ├── github.png ├── gpio-rpi.png ├── gpio.png ├── logo-programoergosum.png ├── objetivos-1.jpg ├── objetivos-2.gif ├── objetivos-2.png ├── objetivos-3.gif ├── objetivos-3.png ├── objetivos-4.png ├── objetivos-5.gif ├── practica-cilindros.gif ├── practica-robot-andarin.gif ├── practica-sensor.gif ├── practica-temperatura.JPG ├── raspberry-pi-3.png ├── raspbian.png └── software.png ├── index.html └── robots.txt /.docker/jekyll/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jekyll/jekyll:latest 2 | 3 | RUN gem install bundler jekyll 4 | 5 | WORKDIR /www 6 | 7 | ENV HOST 0.0.0.0 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .DS_Store 4 | _vendor 5 | Gemfile.lock 6 | .jekyll-metadata -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'github-pages' 4 | # this gem provides regeneration support improvements on Windows 5 | gem 'wdm', '>= 0.1.0' if Gem.win_platform? -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2019 Asociación Programo Ergo Sum 4 | - [@migueabellan](https://github.com/migueabellan) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Programación en Python con Raspberry Pi 2 | 3 | Raspberry Pi es un miniordenador de bajo coste desarrollado para estimular la enseñanza de ciencias de la computación en las escuelas. 4 | 5 | Por otro lado, Python es un lenguaje de programación interpretado cuya filosofía hace hincapié en una sintaxis que favorezca un código legible e intuitivo para usuarios interesados en aprender programación textual. -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | # Maintaned Asociación Programo Ergo Sum 3 | # - [@migueabellan](https://github.com/migueabellan) 4 | 5 | # Build settings 6 | markdown: kramdown 7 | sass: 8 | sass_dir: _sass 9 | style: compressed 10 | 11 | exclude: 12 | - docker-compose.yml 13 | - Gemfile 14 | - Gemfile.lock 15 | - LICENSE 16 | - README.md 17 | -------------------------------------------------------------------------------- /_includes/components/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/components/forkme.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /_includes/cover.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Programación en Python con Raspberry Pi

4 |
5 |
Miguel Ángel Abellán
6 |

Septiembre 2019, Murcia

7 |
8 |
9 |
10 |
11 | Programo Srgo Sum 12 |
13 |
14 |
15 |
16 | ### Objetivos 17 |
18 | 29 |
30 | #### Aprender a programar en Python y MicroPython 31 | 32 | [Air:bit](https://www.makekit.no/airbit) 33 | 34 | ![](images/objetivos-2.gif) 35 |
36 |
37 | #### Conocer el internet de las cosas 38 | 39 | ![](images/objetivos-3.gif) 40 |
41 |
42 | #### Domótica básica con Raspberry Pi 43 | 44 | ![](images/objetivos-4.png) 45 |
46 |
47 | #### Conectar con el mundo analógico 48 | 49 | ![](images/objetivos-5.gif) 50 |
51 |
-------------------------------------------------------------------------------- /_includes/session-1.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 1ª Sesión 4 | 5 | Sistema Operativo Raspbian 6 |
7 |
8 | ### ¿Qué es Raspberry Pi? 9 | 10 | Un ordenador de pequeñas dimensiones destinado principalmente al desarrollo de prototipos y **ámbito educativo**. 11 | 12 | ![](images/raspberry-pi-3.png) 13 | 14 | [Raspberry Pi Documentation](https://www.raspberrypi.org/documentation) 15 |
16 |
17 | #### Modelos 18 | 19 | | Raspberry Pi | 2 B+ | 3 B+ | 4 B+ | Zero | 20 | | :--: | :--: | :--: | :--: | :--: | 21 | | Precio | 35 | 35 | 35 - 55 | 5 | 22 | | Cores | 4 | 4 | 4 | 1 | 23 | | CPU | 900 MHz | 1.2 GHz | 1.5 GHz | 1 GHz | 24 | | RAM | 1 GB | 1 GB | 1-4 GB | 512 MB | 25 | | Ethernet | Si | Si | Si | No | 26 | | WiFi | No | Si | Si | Si | 27 | | GPIO | 40 | 40 | 40 | 40 | 28 | | Consumo | 820 mA | 1400 mA | 1800 mA | 350 mA | 29 |
30 |
31 | #### Hardware 32 | 33 | Hardware abierto, a excepción del chip principal, el Broadcomm, basado en arquitectura ARM (Advanced RISC Machine). 34 | 35 | **RISC** (Reduced Instruction Set Computer) 36 | - Énfasis en el Hardware 37 | - Idea básica: Instrucciones sencillas 38 | - MIPS: 140 instrucciones aprox. 39 | 40 | **CISC** (Complex Instruction Set Computer) 41 | - Énfasis en el Software 42 | - Idea básica: Instrucciones complejas 43 | - MIPS: 325 instrucciones aprox. 44 |
45 |
46 | #### Software 47 | 48 | Disponible una gran cantidad de sistemas operativos (oficiales y no oficiales) para Raspberry Pi, tanto en Linux como Windows. 49 | 50 | ![](images/software.png) 51 |
52 |
53 | ### Raspbian 54 | 55 | Sistema Operativo basado en Linux Debian optimizado para el procesador ARM y recomendado por la fundación Raspberry Pi. 56 | 57 | ![](images/raspbian.png) 58 |
59 |
60 | #### Modos de instalación 61 | 62 | - **Mediante NOOBS:** Instalación mediante asistente de instalación (recomendada para usuarios generalmente poco expertos). 63 | - **Mediante imagen:** Instalación mediante imagen del sistema operativo (para usuarios avanzados). 64 |
65 |
66 | #### Tipos de instalación 67 | 68 | - **Raspbian Pixel:** Versión completa con entorno gráfico (versión de escritorio con menús, ventanas, iconos, fondos de pantalla, etc). 69 | - **Raspbian Lite:** Versión reducida sin entorno gráfico para utilizar en modo terminal o consola. 70 |
71 | 72 |
73 | ## Prácticas 74 | 75 | 1. Instalar Raspbian en Raspberry Pi con NOOBs 76 | 2. Instalar Raspbian en Raspberry Pi con Etcher 77 | 3. Actualizar el sistema operativo Raspbian 78 | 4. Clonar tarjeta SD Raspbian en Raspberry Pi con piclone 79 | 5. Escritorio remoto a través de VNC 80 | 6. Acceso remoto a través de SSH (avanzado) 81 | 7. Consola arcade basada en Raspberry Pi con RetroPie (opcional) 82 | 8. Introducción al sistema operativo Raspbian 83 |
84 |
85 | ### Práctica 1: 86 | 87 | [Instalar Raspbian en Raspberry Pi con NOOBs](https://www.programoergosum.es/tutoriales/instalar-raspbian-con-noobs/) 88 | 89 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/instalar-raspbian-con-noobs/img/preview.jpg) 90 |
91 |
92 | ### Práctica 2: 93 | 94 | [Instalar Raspbian en Raspberry Pi con Etcher](https://www.programoergosum.es/tutoriales/instalar-raspbian-con-etcher/) 95 | 96 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/instalar-raspbian-con-etcher/img/preview.jpg) 97 |
98 |
99 | ### Práctica 3: 100 | 101 | [Actualizar el sistema operativo Raspbian](https://www.programoergosum.es/tutoriales/actualizar-raspbian-en-raspberry-pi/) 102 | 103 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/actualizar-raspbian-en-raspberry-pi/img/preview.jpg) 104 |
105 |
106 | ### Práctica 4: 107 | 108 | [Clonar tarjeta SD Raspbian en Raspberry Pi con piclone](https://www.programoergosum.es/tutoriales/clonar-raspbian-en-raspberry-pi/) 109 | 110 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/clonar-raspbian-en-raspberry-pi/img/preview.jpg) 111 |
112 | 113 |
114 | ### Práctica 5: 115 | 116 | [Escritorio remoto a través de VNC](https://www.programoergosum.es/tutoriales/escritorio-remoto-a-traves-de-vnc/) 117 | 118 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/escritorio-remoto-a-traves-de-vnc/img/preview.jpg) 119 |
120 |
121 | ### Práctica 6: (AVANZADA) 122 | 123 | [Acceso remoto a través de SSH](https://www.programoergosum.es/tutoriales/acceso-remoto-a-traves-de-ssh/) 124 | 125 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/acceso-remoto-a-traves-de-ssh/img/preview.jpg) 126 |
127 |
128 | ### Práctica 7: (OPCIONAL) 129 | 130 | [Consola arcade basada en Raspberry Pi con RetroPie](https://www.programoergosum.es/tutoriales/consola-arcade-basada-en-raspberry-pi-con-retropie) 131 | 132 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/consola-arcade-basada-en-raspberry-pi-con-retropie/img/preview.jpg) 133 |
134 |
135 | ### Práctica 8: 136 | 137 | [Introducción al sistema operativo Raspbian](https://www.programoergosum.es/tutoriales/introduccion-a-raspbian-en-raspberry-pi) 138 | 139 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/introduccion-a-raspbian-en-raspberry-pi/img/preview.jpg) 140 |
141 |
142 | -------------------------------------------------------------------------------- /_includes/session-2.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 2ª Sesión 4 | 5 | Programación en Python 6 |
7 |
8 | ### Lenguaje de programación 9 | 10 | Un lenguaje de programación está compuesto por símbolos y reglas sintácticas y semánticas, expresadas en forma de instrucciones y relaciones lógicas, mediante las cuales se construye el código fuente. 11 | 12 | - **Lenguajes de bajo nivel**: Diseñados para un Hardware específico. 13 | - **Lenguajes de alto nivel**: Pueden emplearse en distintos tipos de arquitecturas. 14 |
15 |
16 | ### Tipos de lenguajes de programación 17 | 18 | - **Interpretado**: Un lenguaje interpretado se ejecuta sin necesidad de ser procesado por el compilador y se detectan los errores en tiempo de ejecución. 19 | - Python 20 | - PHP 21 | - ... 22 | - **Compilado**: Un lenguaje compilado debe ser traducido a lenguaje máquina por el compilador. 23 | - C 24 | - Arduino 25 | - ... 26 |
27 |
28 | ### Paradigmas de la programación 29 | 30 | - **Funcional**: Basados en la programación declarativa de funciones matemáticas. 31 | - **Imperativo**: El más cercano a la estructura del ordenador y programación que conocemos. 32 | - **Orientado a objetos**: Utiliza clases para representar objetos programados mediante programación imperativa. 33 |
34 |
35 | ### Sistema de tipos de la programación 36 | 37 | - **Tipado estático**: Se determina el tipo de todas las expresiones en tiempo de compilación. 38 | - **Tipado dinámico**: Se determina la validez de los tipos de datos durante la ejecución del programa. 39 |
40 |
41 | ### Python 42 | 43 | - **Interpretado**: Se ejecuta sin necesidad de ser procesado por el compilador y se detectan los errores en tiempo de ejecución. 44 | - **Multiparadigma**: Soporta programación funcional, programación imperativa y programación orientada a objetos. 45 | - **Tipado dinámico**: Las variables se comprueban en tiempo de ejecución. 46 | - **Multiplataforma**: disponible para plataformas de Windows, Linux o MAC. 47 | - **Gratuito**: No dispone de licencia para programar. 48 |
49 |
50 | ## Prácticas 51 | 52 | - Aprende Programando en Python 53 | - Clase 1: Introducción 54 | - Clase 2: Variables y tipos 55 | - Clase 4: Operadores aritméticos 56 | - Clase 5: Condicionales 57 | - Clase 6: Bucles for 58 | - **Prueba de nivel A1** 59 |
60 |
61 | ### Aprende Programando 62 | 63 | Aprende Python paso a paso 64 | 65 | [Tutorial en AprendeProgramando](https://www.aprendeprogramando.es/cursos-online/python) 66 | 67 | ![](https://www.aprendeprogramando.es/images/pages/aprende-programando.png) 68 |
69 |
70 | -------------------------------------------------------------------------------- /_includes/session-3.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 3ª Sesión 4 | 5 | Videovigilancia 6 |
7 |
8 | ### Sistema de seguridad 9 | 10 | Utilizando una Raspberry Pi podemos crearnos un sistema de videovigilancia, realizar capturas de pantallas y verlas desde el móvil. 11 |
12 | 13 |
14 | ## Prácticas 15 | 16 | - Configura una webcam en con LUVCview 17 | - Detecta movimientos con Motion (medio) 18 | - Time lapse con fswebcam (avanzado) 19 |
20 |
21 | ### Práctica 1: 22 | 23 | [Configura una webcam en Raspberry Pi con LUVCview](https://www.programoergosum.es/tutoriales/webcam-con-luvcview-en-raspberry-pi) 24 | 25 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/webcam-con-luvcview-en-raspberry-pi/img/preview.jpg) 26 |
27 |
28 | ### Práctica 2: (MEDIO) 29 | 30 | [Detecta movimientos con una webcam y Motion en Raspberry Pi](https://www.programoergosum.es/tutoriales/webcam-con-motion-en-raspberry-pi) 31 | 32 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/webcam-con-motion-en-raspberry-pi/img/preview.jpg) 33 |
34 |
35 | ### Práctica 3: (AVANZADO) 36 | 37 | [Imágenes automáticas con fswebcam en Raspberry Pi](https://www.programoergosum.es/tutoriales/webcam-con-fswebcam-en-raspberry-pi) 38 | 39 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/webcam-con-fswebcam-en-raspberry-pi/img/preview.jpg) 40 |
41 |
42 | ## Prácticas 43 | 44 | - Aprende Programando en Python 45 | - Clase 7 46 | - Clase 8 47 | - Clase 9 48 | - Prueba de nivel A2 49 | - Clase 13 50 | - Clase 14 51 |
52 |
53 | ### Aprende Programando 54 | 55 | Aprende Python paso a paso 56 | 57 | [Tutorial en AprendeProgramando](https://www.aprendeprogramando.es/cursos-online/python) 58 | 59 | ![](https://www.aprendeprogramando.es/images/pages/aprende-programando.png) 60 |
61 |
62 | -------------------------------------------------------------------------------- /_includes/session-4.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 4ª Sesión 4 | 5 | Programación en MicroPython 6 |
7 |
8 | ### ¿Qué es GitHub? 9 | 10 | GitHub es una plataforma para alojar proyectos utilizando el sistema de control de versiones de **Git**. 11 | 12 | ![](images/github.png) 13 | 14 | [GitHub ElCableAmarillo](https://github.com/ElCableAmarillo) 15 |
16 |
17 | ## Prácticas 18 | 19 | - Crea una cuenta en GitHub 20 | - Crea un repositorio para crear tu web en HTML 21 | - Haz un fork del proyecto slides 22 |
23 |
24 | ### Práctica 1: 25 | 26 | [Introducción a GitHub](https://www.programoergosum.es/tutoriales/introduccion-a-github/) 27 | 28 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/introduccion-a-github/img/preview.jpg) 29 |
30 |
31 | ### Micropython 32 | 33 | MicroPython​ es una implementación de Python 3, escrita en C, optimizada para ejecutarse en un microcontrolador. 34 |
35 |
36 | ### Microbit 37 | 38 | Micro:bit es un proyecto de la BBC cuyo propósito principal es aprender a programar. 39 | 40 | [Ideas](https://microbit.org/ideas/) 41 | 42 | [Diseños](https://www.thingiverse.com/search?q=microbit) 43 | 44 | [Herramientas](https://github.com/carlosperate/awesome-microbit) 45 |
46 |
47 | ## Prácticas 48 | 49 | - Primeros pasos con Micro:bit y Mu Editor 50 | - Matriz de LEDs en Micro:bit con MicroPython 51 | - Botones en Micro:bit con MicroPython 52 | - Pines IO en Micro:bit con MicroPython 53 | - Acelerómetro en Micro:bit con MicroPython 54 |
55 |
56 | ### Práctica 1: 57 | 58 | [Programa tu Micro:bit en Raspberry Pi con MicroPython](https://www.programoergosum.es/tutoriales/introduccion-a-mu-editor-en-raspbian/) 59 | 60 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/introduccion-a-mu-editor-en-raspbian/img/preview.jpg) 61 |
62 |
63 | ### Práctica 2: 64 | 65 | [Matriz de LEDs en Microbit con Python](https://www.programoergosum.es/tutoriales/matriz-de-leds-en-microbit-con-python/) 66 | 67 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/matriz-de-leds-en-microbit-con-python/img/preview.jpg) 68 |
69 |
70 | ### Práctica 3: 71 | 72 | [Botones en Microbit con Python](https://www.programoergosum.es/tutoriales/botones-en-microbit-con-python/) 73 | 74 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/botones-en-microbit-con-python/img/preview.jpg) 75 |
76 |
77 | ### Práctica 4: 78 | 79 | [Pines GPIO en Microbit con Python](https://www.programoergosum.es/tutoriales/pines-gpio-en-microbit-con-python/) 80 | 81 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/pines-gpio-en-microbit-con-python/img/preview.jpg) 82 |
83 |
84 | ### Práctica 5: 85 | 86 | [Acelerómetro en Microbit con Python](https://www.programoergosum.es/tutoriales/acelerometro-en-microbit-con-python/) 87 | 88 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/acelerometro-en-microbit-con-python/img/preview.jpg) 89 |
90 |
91 | -------------------------------------------------------------------------------- /_includes/session-5.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 5ª Sesión 4 | 5 | Pines GPIO + Arduino 6 |
7 |
8 | ### Pines GPIO 9 | 10 | General Purpose Input Output (GPIO) es un sistema de entrada y salida de propósito general. 11 | 12 | ![](images/gpio.png) 13 | 14 | [Pinout](https://es.pinout.xyz/#) 15 |
16 |
17 | ### Modo de los pines 18 | 19 | - GPIO: se numeran de forma física que ocupan en la placa (gris) 20 | - BCM: se numeran por la correspondencia en el chip Broadcom CPU. 21 | 22 | ![](images/gpio-rpi.png) 23 |
24 |
25 | ### Thonny Python IDE 26 | 27 | Thonny Python IDE es un entorno de programación sencillo para programar en Python con Raspbian. 28 |
29 |
30 | ## Prácticas 31 | 32 | - Primeros pasos con Pines GPIO en Raspberry Pi 33 |
34 |
35 | ### Práctica 1: 36 | 37 | [Primeros pasos con Pines GPIO en Raspberry Pi](https://www.programoergosum.es/tutoriales/introduccion-a-pines-gpio-en-raspbian) 38 | 39 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/introduccion-a-pines-gpio-en-raspbian/img/preview.jpg) 40 |
41 | 42 |
43 | ### PySerial con Arduino 44 | 45 | Con PySerial podemos comunicarnos a través del serial entre Arduino y Raspberry Pi. 46 |
47 |
48 | ## Prácticas 49 | 50 | - Instalar Arduino IDE en Raspberry Pi 51 | - Conectando Raspberry Pi y Arduino con PySerial 52 |
53 |
54 | ### Práctica 1: 55 | 56 | [Instalar Arduino IDE en Raspberry Pi](https://www.programoergosum.es/tutoriales/instalar-arduino-ide-en-raspbian) 57 | 58 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/instalar-arduino-ide-en-raspbian/img/preview.jpg) 59 |
60 |
61 | ### Práctica 2: 62 | 63 | [Conectando Raspberry Pi y Arduino con PySerial](https://www.programoergosum.es/tutoriales/conectando-arduino-con-pyserial/) 64 | 65 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/conectando-arduino-con-pyserial/img/preview.jpg) 66 |
67 |
68 | -------------------------------------------------------------------------------- /_includes/session-6.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 6ª Sesión 4 | 5 | Internet de las cosas 6 |
7 |
8 | ## Prácticas 9 | 10 | - Servidor web con Flask en Python 11 | - Control de GPIO con Flask en Python 12 | - Arranque automático en Raspbian (AVANZADA) 13 |
14 |
15 | ### Práctica 1: 16 | 17 | [Servidor web con Flask en Python](https://www.programoergosum.es/tutoriales/servidor-web-con-flask-en-raspberry-pi/) 18 | 19 | 20 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/servidor-web-con-flask-en-raspberry-pi/img/preview.jpg) 21 |
22 | 23 |
24 | ### Práctica 2: 25 | 26 | [Control de GPIO con Flask en Python](https://www.programoergosum.es/tutoriales/control-de-gpio-con-flask-en-raspberry-pi/) 27 | 28 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/control-de-gpio-con-flask-en-raspberry-pi/img/preview.jpg) 29 |
30 |
31 | ### Práctica 3: (AVANZADA) 32 | 33 | [Arranque automático en Raspbian](https://www.programoergosum.es/tutoriales/arranque-automatico-en-raspbian/) 34 | 35 | ![](https://raw.githubusercontent.com/ProgramoErgoSum/Tutoriales/master/v1/arranque-automatico-en-raspbian/img/preview.jpg) 36 |
37 |
38 | -------------------------------------------------------------------------------- /_includes/session-7.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | ## 7ª Sesión 4 | 5 | Proyectos TIC 6 |
7 |
8 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Programación en Python con Raspberry Pi 11 | 12 | 13 | 14 | 15 | 16 | {% include components/forkme.html %} 17 |
18 |
19 | {% include cover.html %} 20 | {% include session-1.html %} 21 | {% include session-2.html %} 22 | {% include session-3.html %} 23 | {% include session-4.html %} 24 | {% include session-5.html %} 25 | {% include session-6.html %} 26 | {% include session-7.html %} 27 |
28 |
29 | {% include components/footer.html %} 30 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /_sass/_murcia.scss: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Lato:300,700); 2 | @import url(https://fonts.googleapis.com/css?family=Lora:700); 3 | 4 | section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { 5 | color: #141414; } 6 | 7 | .reveal .controls { 8 | right: 50px; 9 | bottom: 50px; } 10 | 11 | .line { 12 | content: ''; 13 | position: fixed; 14 | background: #c47182; 15 | z-index: 105; } 16 | .line.top { 17 | left: 0; 18 | top: 0; 19 | width: 100%; 20 | height: 30px; } 21 | @media (max-width: 840px) { 22 | .line.top { 23 | height: 15px; } } 24 | .line.bottom { 25 | left: 0; 26 | top: auto; 27 | bottom: 0; 28 | width: 100%; 29 | height: 30px; } 30 | @media (max-width: 840px) { 31 | .line.bottom { 32 | height: 15px; } } 33 | .line.left { 34 | left: 0; 35 | top: 0; 36 | width: 30px; 37 | height: 200%; } 38 | @media (max-width: 840px) { 39 | .line.left { 40 | width: 15px; } } 41 | .line.right { 42 | left: auto; 43 | right: 0; 44 | top: 0; 45 | width: 30px; 46 | height: 200%; } 47 | @media (max-width: 840px) { 48 | .line.right { 49 | width: 15px; } } 50 | 51 | .reveal.has-dark-background .line { 52 | display: none; } 53 | 54 | /********************************************* 55 | * GLOBAL STYLES 56 | *********************************************/ 57 | body { 58 | background: #fff; 59 | background-color: #fff; } 60 | 61 | .reveal { 62 | font-family: "Lato", serif; 63 | font-size: 32px; 64 | font-weight: normal; 65 | color: #363636; } 66 | 67 | ::selection { 68 | color: #fff; 69 | background: #d8d8d8; 70 | text-shadow: none; } 71 | 72 | ::-moz-selection { 73 | color: #fff; 74 | background: #d8d8d8; 75 | text-shadow: none; } 76 | 77 | .reveal .slides > section, 78 | .reveal .slides > section > section { 79 | line-height: 1.3; 80 | font-weight: inherit; } 81 | 82 | /********************************************* 83 | * HEADERS 84 | *********************************************/ 85 | .reveal h1, 86 | .reveal h2, 87 | .reveal h3, 88 | .reveal h4, 89 | .reveal h5, 90 | .reveal h6 { 91 | margin: 0 0 20px 0; 92 | color: #141414; 93 | font-family: "Lora", sans-serif; 94 | font-weight: 700; 95 | line-height: 1.2; 96 | letter-spacing: normal; 97 | text-transform: uppercase; 98 | text-shadow: none; 99 | word-wrap: break-word; } 100 | 101 | .reveal h1 { 102 | font-size: 2em; } 103 | 104 | .reveal h2 { 105 | font-size: 1.8em; } 106 | 107 | .reveal h3 { 108 | font-size: 1.4em; } 109 | 110 | .reveal h4 { 111 | font-size: 1.2em; } 112 | 113 | .reveal h1 { 114 | text-shadow: none; } 115 | 116 | /********************************************* 117 | * OTHER 118 | *********************************************/ 119 | .reveal p { 120 | margin: 20px 0; 121 | line-height: 1.3; } 122 | 123 | /* Ensure certain elements are never larger than the slide itself */ 124 | .reveal img, 125 | .reveal video, 126 | .reveal iframe { 127 | max-width: 95%; 128 | max-height: 95%; } 129 | 130 | .reveal strong, 131 | .reveal b { 132 | font-weight: bold; } 133 | 134 | .reveal em { 135 | font-style: italic; } 136 | 137 | .reveal ol, 138 | .reveal dl, 139 | .reveal ul { 140 | display: inline-block; 141 | text-align: left; 142 | margin: 0 0 0 1em; } 143 | 144 | .reveal ol { 145 | list-style-type: decimal; } 146 | 147 | .reveal ul { 148 | list-style-type: disc; } 149 | 150 | .reveal ul ul { 151 | list-style-type: square; } 152 | 153 | .reveal ul ul ul { 154 | list-style-type: circle; } 155 | 156 | .reveal ul ul, 157 | .reveal ul ol, 158 | .reveal ol ol, 159 | .reveal ol ul { 160 | display: block; 161 | margin-left: 40px; } 162 | 163 | .reveal dt { 164 | font-weight: bold; } 165 | 166 | .reveal dd { 167 | margin-left: 40px; } 168 | 169 | .reveal blockquote { 170 | display: block; 171 | position: relative; 172 | width: 70%; 173 | margin: 20px auto; 174 | padding: 5px; 175 | font-style: italic; 176 | background: rgba(255, 255, 255, 0.05); 177 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 178 | 179 | .reveal blockquote p:first-child, 180 | .reveal blockquote p:last-child { 181 | display: inline-block; } 182 | 183 | .reveal q { 184 | font-style: italic; } 185 | 186 | .reveal pre { 187 | display: block; 188 | position: relative; 189 | width: 90%; 190 | margin: 20px auto; 191 | text-align: left; 192 | font-size: 0.55em; 193 | font-family: monospace; 194 | line-height: 1.2em; 195 | word-wrap: break-word; 196 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 197 | 198 | .reveal code { 199 | font-family: monospace; 200 | text-transform: none; } 201 | 202 | .reveal pre code { 203 | display: block; 204 | padding: 5px; 205 | overflow: auto; 206 | max-height: 400px; 207 | word-wrap: normal; } 208 | 209 | .reveal table { 210 | margin: auto; 211 | border-collapse: collapse; 212 | border-spacing: 0; } 213 | 214 | .reveal table th { 215 | font-weight: bold; } 216 | 217 | .reveal table th, 218 | .reveal table td { 219 | text-align: left; 220 | padding: 0.2em 0.5em 0.2em 0.5em; 221 | border-bottom: 1px solid; } 222 | 223 | .reveal table th[align="center"], 224 | .reveal table td[align="center"] { 225 | text-align: center; } 226 | 227 | .reveal table th[align="right"], 228 | .reveal table td[align="right"] { 229 | text-align: right; } 230 | 231 | .reveal table tbody tr:last-child th, 232 | .reveal table tbody tr:last-child td { 233 | border-bottom: none; } 234 | 235 | .reveal sup { 236 | vertical-align: super; } 237 | 238 | .reveal sub { 239 | vertical-align: sub; } 240 | 241 | .reveal small { 242 | display: inline-block; 243 | font-size: 0.6em; 244 | line-height: 1.2em; 245 | vertical-align: top; } 246 | 247 | .reveal small * { 248 | vertical-align: top; } 249 | 250 | /********************************************* 251 | * LINKS 252 | *********************************************/ 253 | .reveal a { 254 | color: #892034; 255 | text-decoration: none; 256 | -webkit-transition: color .15s ease; 257 | -moz-transition: color .15s ease; 258 | transition: color .15s ease; } 259 | 260 | .reveal a:hover { 261 | color: #c40041; 262 | text-shadow: none; 263 | border: none; } 264 | 265 | .reveal .roll span:after { 266 | color: #fff; 267 | background: #f30053; } 268 | 269 | /********************************************* 270 | * IMAGES 271 | *********************************************/ 272 | .reveal section img { 273 | margin: 15px 0px; 274 | } 275 | 276 | .reveal section img.plain { 277 | border: 0; 278 | box-shadow: none; } 279 | 280 | .reveal a img { 281 | -webkit-transition: all .15s linear; 282 | -moz-transition: all .15s linear; 283 | transition: all .15s linear; } 284 | 285 | .reveal a:hover img { 286 | 287 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 288 | 289 | /********************************************* 290 | * NAVIGATION CONTROLS 291 | *********************************************/ 292 | .reveal .controls { 293 | color: #892034; } 294 | 295 | /********************************************* 296 | * PROGRESS BAR 297 | *********************************************/ 298 | .reveal .progress { 299 | background: rgba(0, 0, 0, 0.2); 300 | color: #892034; } 301 | 302 | .reveal .progress span { 303 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 304 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 305 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 306 | 307 | .reveal .progress { 308 | z-index: 1000; 309 | color: #892034; } 310 | 311 | -------------------------------------------------------------------------------- /_sass/_reset.scss: -------------------------------------------------------------------------------- 1 | .row { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | .col { 6 | 7 | } 8 | } 9 | hr { 10 | margin: 50px 0; 11 | border: 3px solid #f0f0f0; 12 | } 13 | img { 14 | max-width: 100%; 15 | } 16 | -------------------------------------------------------------------------------- /_sass/components/_footer.scss: -------------------------------------------------------------------------------- 1 | footer { 2 | position: absolute; 3 | z-index: 99; 4 | right: 0; 5 | bottom: 0; 6 | left: 0; 7 | background: #2d2d2d; 8 | margin: 0; 9 | padding: 5px 10px; 10 | text-align: center; 11 | font-size: 12px; 12 | color: #fff; 13 | p { 14 | margin: 0; 15 | padding: 5px 0; 16 | } 17 | span { 18 | color: #dc3545; 19 | } 20 | a { 21 | color: #888; 22 | &:hover { 23 | color: #f0f0f0; 24 | text-decoration: none; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /_sass/components/_forkme.scss: -------------------------------------------------------------------------------- 1 | .github-corner { 2 | fill: #2d2d2d; 3 | color: #fff; 4 | position: absolute; 5 | z-index: 99; 6 | top: 0; 7 | border: 0; 8 | right: 0; 9 | } 10 | .github-corner:hover .octo-arm { 11 | animation: octocat-wave 560ms ease-in-out; 12 | } 13 | @keyframes octocat-wave { 14 | 0%, 15 | 100% { 16 | transform: rotate(0); 17 | } 18 | 20%, 19 | 60% { 20 | transform: rotate(-25deg); 21 | } 22 | 40%, 23 | 80% { 24 | transform: rotate(10deg); 25 | } 26 | } 27 | @media (max-width: 500px) { 28 | .github-corner:hover .octo-arm { 29 | animation: none; 30 | } 31 | .github-corner .octo-arm { 32 | animation: octocat-wave 560ms ease-in-out; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /css/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | // "Theme" styles 5 | @import "reset"; 6 | @import "murcia"; 7 | 8 | // Components 9 | @import "components/forkme"; 10 | @import "components/footer"; 11 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | jekyll: 6 | image: jekyll/jekyll:latest 7 | container_name: programacion-en-python-con-raspberry-pi 8 | command: jekyll serve --watch --incremental 9 | ports: 10 | - 4000:4000 11 | volumes: 12 | - .:/srv/jekyll -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/favicon.ico -------------------------------------------------------------------------------- /images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/github.png -------------------------------------------------------------------------------- /images/gpio-rpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/gpio-rpi.png -------------------------------------------------------------------------------- /images/gpio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/gpio.png -------------------------------------------------------------------------------- /images/logo-programoergosum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/logo-programoergosum.png -------------------------------------------------------------------------------- /images/objetivos-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-1.jpg -------------------------------------------------------------------------------- /images/objetivos-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-2.gif -------------------------------------------------------------------------------- /images/objetivos-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-2.png -------------------------------------------------------------------------------- /images/objetivos-3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-3.gif -------------------------------------------------------------------------------- /images/objetivos-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-3.png -------------------------------------------------------------------------------- /images/objetivos-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-4.png -------------------------------------------------------------------------------- /images/objetivos-5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/objetivos-5.gif -------------------------------------------------------------------------------- /images/practica-cilindros.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/practica-cilindros.gif -------------------------------------------------------------------------------- /images/practica-robot-andarin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/practica-robot-andarin.gif -------------------------------------------------------------------------------- /images/practica-sensor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/practica-sensor.gif -------------------------------------------------------------------------------- /images/practica-temperatura.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/practica-temperatura.JPG -------------------------------------------------------------------------------- /images/raspberry-pi-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/raspberry-pi-3.png -------------------------------------------------------------------------------- /images/raspbian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/raspbian.png -------------------------------------------------------------------------------- /images/software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgramoErgoSum/programacion-en-python-con-raspberry-pi/a8beeb905d5b379fc215b90b60e84d3f154d3eda/images/software.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | Disallow: / 6 | --------------------------------------------------------------------------------