Wednesday, 01 July, 2026г.
russian english deutsch french spanish portuguese czech greek georgian chinese japanese korean indonesian turkish thai uzbek

пример: покупка автомобиля в Запорожье

 

+ ???? Probando mascarillas con el sensor de gas| MQ-2 | Arduino con Python desde cero | ¡Muy básico!

+ ???? Probando mascarillas con el sensor de gas| MQ-2 | Arduino con Python desde cero | ¡Muy básico!У вашего броузера проблема в совместимости с HTML5

En esta ocasión te mostramos qué pasa, cuando soplamos a través de las mascarillas utilizamos el sensor de gas y humo de arduino y graficamos los resultados ¡Es muy sencillo y aquí te mostramos cómo hacerlo paso a paso! Esperamos que este vídeo te sea de utilidad, no olvides dejarnos tus comentarios, nos dará mucho gusto saludarte.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Nuestro blog:
http://cctmexico.blogspot.mx/p/python.html
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Software y módulos que mencionamos en el vídeo:
IDE de Arduino:
https://www.arduino.cc/en/software
Pycharm | Community:
https://www.jetbrains.com/pycharm/download/
Anaconda para instalar Python:
https://youtu.be/Ww2kfuLpqGQ
Para instalar PySerial:
pip install pyserial
En Windows:
https://pypi.org/project/pyserial/
Documentación oficial:
https://pyserial.readthedocs.io/en/latest/pyserial.html
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Links que mencionamos en el vídeo:
Página del proyecto:
https://lastminuteengineers.com/mq2-gas-senser-arduino-tutorial/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
????Código para subir a la tarjeta de Arduino:
/* Testing MQ-2 GAS sensor with serial monitor
Suitable for detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen or smoke
More info: http://www.ardumotive.com/how-to-use-mq2-gas-sensor-en.html
Dev: Michalis Vasilakis // Date: 11/6/2015 // www.ardumotive.com */

const int gasPin = A0; //GAS sensor output pin to Arduino analog A0 pin


void setup()
{ Serial.begin(9600); //Initialize serial port - 9600 bps
}

void loop()
{ Serial.println(analogRead(gasPin));
delay(1000); // Print value every 1 sec.
} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Líneas de código que mencionamos en el vídeo:
import serial
import matplotlib.pyplot as plt
import matplotlib.animation as animation

arduinoSerialData = serial.Serial(’/dev/ttyACM0’,9600)
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
xdatos, ydatos = [], []

while True:
if (arduinoSerialData.inWaiting()*mayor a cambiar al signo*0):

def animate(i,xdatos,ydatos):
datos = arduinoSerialData.readline()
datos = float(datos)
xdatos.append(i)
ydatos.append(datos)
ax.clear()
ax.plot(xdatos,ydatos)

ani = animation.FuncAnimation(fig,animate, fargs=(xdatos,ydatos))
plt.show()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
⏰ Por si tienen prisa, el minuto a minuto del vídeo:
00:00 Introducción
03:25 ¿Qué mascarillas voy a usar?
02:50 Revisión rápida del código en C/C++ para la tarjeta Arduino
05:35 Armado en el miniboard
07:36 Código en Python para graficar en tiempo real los datos del sensor
09:13 Corridas y pruebas para generar la gráfica
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
????️ Otros vídeos que pueden ser de utilidad:
✔Nuestra lista de reproducción de Pandas en Python
https://www.youtube.com/watch?v=JJ7BMoQotEY&list=PLgHCrivozIb0ULMKfJVV-rFdRG2OeEgfq
✔Nuestra lista de reproducción de Machine Learning en Python
https://www.youtube.com/watch?v=b4zmSqB9npI&list=PLgHCrivozIb0HQ9oPRLVqw5scdIG-AxQL

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Música
Everglow
Patrick Patrikios
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
???? Hashtags
#ArduinoconPython #create

Мой аккаунт