Fabrication industrielle
Internet des objets industriel | Matériaux industriels | Entretien et réparation d'équipement | Programmation industrielle |
home  MfgRobots >> Fabrication industrielle >  >> Manufacturing Technology >> Processus de fabrication

Octopod :projet d'automatisation de la maison/de l'industrie Smart IoT

Composants et fournitures

Arduino UNO
× 1
Arduino MKR WiFi 1010
Ceci ou tout autre Wifi ESP8266/ ESP32Ce n'était pas disponible dans mon pays, donc je suis allé avec NodeMCU ESP8266
× 1
Maxim Integrated MAX32630FTHR
Vous pouvez choisir entre MAX32620FTHR, Arduino 1010 ou n'importe quelle carte ESP8266. Avec cette carte, vous aurez besoin d'un WiFi externe Module ou une puce Esp8266 pour Internet
× 1
Raspberry Pi Zero Wireless
Vous pouvez également utiliser Raspi 2/3 normal !
× 1
Capteur de température et d'humidité DHT11 (4 broches)
× 1
Seed Grove - Capteur de gaz (MQ2)
× 1
Capteur d'humidité du sol SparkFun (avec bornes à vis)
× 1
Capteur de mouvement PIR (générique)
Facultatif
× 1
Lecteur RFID (générique)
× 1
Relais (générique)
2 canaux de préférence
× 1
Cathode commune diffuse RVB
× 1
Module de caméra Raspberry Pi
× 1
Servos (Tower Pro MG996R)
× 1
Sonnerie
× 2
Module Bluetooth HC-05
Facultatif
× 1
LED (générique)
× 4
Adaptateur mural/Power Bank
× 2
Carte mémoire
plus de 4 Go et de préférence Classe 10 (Requis pour Raspberry Pi OS)
× 1

Outils et machines nécessaires

Pistolet à colle chaude (générique)
Imprimante 3D (générique)
Facultatif
Outils à main
Pince à bec effilé, ciseaux, cutter, etc.

Applications et services en ligne

Blynk
OpenCV

À propos de ce projet

Il existe de nombreux projets d'automatisation IoT, mais croyez-moi, il n'y a rien de tel ! Octopod est fabriqué à l'aide de NodeMCU (MAX32620FTHR ou Arduino MKR 1010), Arduino Uno, et Raspberry Pi 3 . Octopod vous permet de rendre votre maison intelligente. Octopod vous envoie diverses données comme la température , humidité, et qualité du gaz à l'intérieur de votre maison/bureau/industrie. Octopod vous envoie une notification chaque fois qu'il détecte une sorte de mouvement à l'intérieur et vous indique quand vous devez arroser vos plantes . Vous pouvez également contrôler vos électroménagers via un Blynk application sur votre smartphone. Octopod permet même un véritable éclairage d'ambiance !

Octopod est équipé d'une toute petite caméra , qui vous envoie un flux en direct . Cette caméra utilise également l'intelligence artificielle pour détecter les humains à sa vue et vous envoie leurs photos . De plus, il dispose d'une RFID verrouillage des portes système ! Génial, non ?

Comment tout fonctionne ?

Le NodeMCU est connecté à un ensemble de capteurs, un module relais et des LED RVB. Il est connecté à l'application Blynk sur un smartphone via WiFi, qui envoie toutes les données et vous permet de contrôler votre maison.

Raspberry Pi est également connecté au WiFi, ce qui vous permet de voir le flux en direct via la caméra Pi. Nous avons également installé des bibliothèques OpenCV sur le Pi et configuré le Pi pour détecter tout être humain à sa vue et vous envoyer leurs images par e-mail.

L'unité de porte intelligente utilise un module RFID. Lorsque le RFID autorisé est amené à sa portée, il ouvre automatiquement la porte.

ÉTAPE 1 :Codage de l'octopode principal

J'ai ajouté des commentaires sur presque chaque ligne, donc vous ne vous contentez pas de copier mais vous comprenez. Ici, je vais vous dire ce qui se passe réellement lorsque le code est exécuté en quelques mots !

  • Y compris les bibliothèques :

Ce code utilise 2 bibliothèques principales, la bibliothèque Blynk pour rendre le code compatible avec l'application Blynk et l'autre bibliothèque est la bibliothèque de température DHT11, qui convertit les données brutes du capteur en température et humidité. Pour télécharger ces bibliothèques, accédez simplement aux liens indiqués dans le code et téléchargez-les. Ensuite, dirigez-vous vers Arduino IDE Sketch → Inclure la bibliothèque → Ajouter une bibliothèque .zip et sélectionnez vos bibliothèques téléchargées.

#include //Inclure la bibliothèque Blynk#include //Inclure la bibliothèque Blynk#include //Inclure la bibliothèque de capteurs DHT#define BLYNK_PRINT Serial 

Il s'agit d'un code Blynk qui vous aide à connecter votre nodemcu à Internet, puis à l'authentifier auprès de votre application.

// Vous devriez obtenir le jeton d'authentification dans l'application Blynk.// Accédez aux paramètres du projet (icône de noix).char auth[] ="Votre clé d'authentification" ;// Vos informations d'identification WiFi.// Définir password to "" pour les réseaux ouverts.char ssid[] ="Your WiFi SSID";char pass[] ="Your WiFi Pass"; 
  • Définition des épingles et des nombres entiers :

Dans ce segment, nous définissons les broches de nos différents capteurs. Vous pouvez les changer selon votre conviction. Nous définissons également certains entiers que nous avons tendance à utiliser au cours de notre code.

#define DHTPIN 2 // À quelle broche numérique le capteur de température et d'humidité est connecté#define soilPin 4 // À quelle broche numérique le capteur d'humidité du sol est connecté#define gasPin A0 // À quelle broche analogique le capteur de gaz est connecté to#define pirPin 12 // Quelle broche numérique du capteur d'humidité du sol est connectée à int pirValue; // Endroit pour stocker read PIR Valueint soilValue; // Lieu de stockage read Soil Moisture Valueint PIRpinValue; // Place pour stocker la valeur envoyée par Blynk App Pin V0int SOILpinValue; // Emplacement pour stocker la valeur envoyée par Blynk App Pin V1 
  • BLYNK_WRITE() :

Avec ce code, nous disons à l'application Blynk qu'elle peut utiliser les broches V0 et V1 pour indiquer au code si la détection de mouvement et le test d'humidité du sol sont activés.

BLYNK_WRITE(V0) //La broche VO de l'application Blynk indique si la détection de mouvement est activée{ PIRpinValue =param.asInt(); } BLYNK_WRITE (V1) // La broche V1 de l'application Blynk indique si l'humidité du sol est activée { SOILpinValue =param.asInt (); } 
  • void sendSensor() :

Ce code prend les données de DHT11 pour les rendre utilisables, puis les envoie respectivement aux broches V5 et V6.

void sendSensor(){ int h =dht.readHumidity(); int t =dht.readTemperature(); // ou dht.readTemperature(true) pour Fahrenheit if (isnan(h) || isnan(t)) { Serial.println("Échec de la lecture depuis le capteur DHT !"); // pour vérifier si le capteur n'envoie pas de fausses valeurs return ; } // Vous pouvez envoyer n'importe quelle valeur à tout moment. // Veuillez ne pas envoyer plus de 10 valeurs par seconde. Blynk.virtualWrite(V5, h); // envoie l'humidité à la broche V5 Blynk.virtualWrite(V6, t); // envoie la température à la broche V7} 
  • void getPirValue() &void getSoilValue() :

Lit la valeur numérique des capteurs, puis exécute une condition if- else pour vérifier l'état du capteur. Si le capteur est dans l'état requis, il envoie une notification de l'application Blynk.

void getPirValue(void){ pirValue =digitalRead(pirPin); if (pirValue) // La broche numérique du PIR donne une valeur élevée à la détection humaine { Serial.println ("Motion detected"); Blynk.notify("Mouvement détecté"); }}void getSoilValue(void){solValue =digitalRead(solPin); if (soilValue ==HIGH) // la broche numérique du capteur de sol donne une valeur faible lorsque l'humidité est inférieure { Serial.println ("Water Plants"); Blynk.notify("Plantes aquatiques"); }} 
  • configuration vide() :

Dans la configuration, nous faisons quelques choses qui ne doivent être faites qu'une seule fois. Comme : Démarrer la communication série à un débit en bauds fixe, autoriser ce code à l'application Blynk, commencer les lectures du capteur Dht, puis tweeter sur votre compte Twitter que votre projet Smart Home est en ligne, puis dire au nœud que Pir Pin et Soil Sensor L'épingle est destinée à prendre uniquement l'entrée.

void setup(){ // Console de débogage Serial.begin(9600); Blynk.begin(auth, ssid, pass); // Vous pouvez également spécifier le serveur ://Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442); //Blynk.begin(auth, ssid, pass, IPAddress (192,168,1,100), 8442); dht.begin(); // Commence à lire DHT Blynk.tweet("OCTOPOD EST EN LIGNE ! "); // Tweating sur votre Twitter Handle que vous projetez est en ligne pinMode(pirPin,INPUT); // Définir que Pir Pin est censé prendre en entrée uniquement pinMode(soilPin,INPUT); // Définir que la broche du capteur de sol est censée prendre en entrée uniquement // Configurer une fonction à appeler toutes les deux timer.setInterval(1000L, sendSensor);} 
  • boucle vide() :

Dans la boucle, nous écrivons des choses qui doivent être faites encore et encore. Ici, nous nous assurons que le code que nous avons écrit avant l'installation s'exécute. Ensuite, nous écrivons 2 instructions If-Else qui vérifient les états de la broche V0 et de la broche V1, puis prennent les valeurs des capteurs en conséquence.

boucle vide(){ Blynk.run(); timer.run(); if (PIRpinValue ==HIGH) // La broche VO de l'application Blynk indique si la détection de mouvement est activée { getPirValue (); } if (SOILpinValue ==HIGH) // La broche V1 de l'application Blynk indique si l'humidité du sol est activée { getSoilValue(); } } 

ÉTAPE 2 :Codage de la serrure intelligente RFID

Pour être honnête, c'est un code simple et facile et n'a pas besoin de beaucoup d'explications. Mais, je vais quand même vous dire en quelques mots ce que cela fait. Il existe deux versions du code, l'une est si vous souhaitez connecter le boîtier de l'unité de porte à Bluetooth afin qu'il vous indique quand votre porte est ouverte via le terminal série. D'autres envoient en série afin qu'il puisse être consulté si vous connectez votre Arduino à votre ordinateur. Je préfère cependant la version simple sans Bluetooth. Alors c'est parti !

  • Allez dans Sketch → Inclure la bibliothèque → Gérer la bibliothèque → Tapez dans la barre de recherche MFRC522 et installez la bibliothèque. Ensuite, allez dans Fichier → Exemples → Bibliothèques personnalisées → MFRC522 → dumpInfo Sketch. Au début, vous pouvez lire comment connecter les broches (ou reportez-vous à l'image). Ensuite, exécutez le code et ouvrez le moniteur série et apportez votre carte Rfid devant le module MFRC522 et attendez 5 secondes. Ensuite, notez l'UID de la carte de la même manière, notez l'UID de vos autres cartes et porte-clés.
  • Ensuite, téléchargez le code que vous aimez. Ouvrez le code et accédez à cette ligne. Ici, à la place de ces X, ajoutez l'UID de la carte que vous souhaitez utiliser pour ouvrir la porte. Maintenant que vous êtes prêt, téléchargez simplement le code.
if (content.substring(1) =="XX XX XX XX") {} 

Dans ce code, nous faisons deux choses principales, c'est-à-dire dans la partie If-Else du code. Dans si nous disons à l'arduino que si l'UID de la carte correspond à l'UID mentionné, faites bouger le servo (afin que la porte s'ouvre) et fasse clignoter des LED et émettre des sons en utilisant le buzzer. Sinon, si les UID ne font pas clignoter certaines LED et émettent des sons en utilisant le buzzer.

ÉTAPE 3 :Configuration de l'IA de détection humaine Raspberry Pi

Dans cette étape guidée, nous allons apprendre à créer une caméra de sécurité intelligente. La caméra vous enverra un e-mail chaque fois qu'elle détectera l'objet et si vous êtes sur le même réseau WiFi, vous pouvez accéder aux images en direct de la caméra en tapant l'adresse IP de votre Raspberry Pi. Je vais vous montrer comment créer la caméra intelligente à partir de zéro. Allons-y !

Exigences :

1. OpenCV (Open Source Computer Vision Library)

2. Raspberry Pi 3B

3. Caméra Raspberry Pi V2

Hypothèses :

1. Raspberry Pi 3 avec Raspbian Stretch installé. Si vous ne possédez pas déjà le système d'exploitation Raspbian Stretch, vous devrez mettre à niveau votre système d'exploitation pour profiter des nouvelles fonctionnalités de Raspbian Stretch.

Pour mettre à niveau votre Raspberry Pi 3 vers Raspbian Stretch, vous pouvez le télécharger ici et suivre ces instructions de mise à niveau (ou celles-ci pour la route NOOBS qui est recommandée pour les débutants).

Remarque :si vous mettez à niveau votre Raspberry Pi 3 de Raspbian Jessie vers Raspbian Stretch, des problèmes peuvent survenir. Procédez à vos risques et périls et consultez les forums Raspberry Pi pour obtenir de l'aide. Important :je vous recommande de procéder à une nouvelle installation de Raspbian Stretch ! La mise à niveau depuis Raspbian Jessie n'est pas recommandée.

2. Accès physique à votre Raspberry Pi 3 afin que vous puissiez ouvrir un terminal et exécuter des commandesAccès à distance via SSH ou VNC. Je ferai la majorité de ce tutoriel via SSH, mais tant que vous avez accès à un terminal, vous pouvez facilement suivre.

  • Étape 1 :FIXER LA CAMÉRA AU RASPBERRY PI 3

1. Ouvrez votre module de caméra Raspberry Pi. Sachez que l'appareil photo peut être endommagé par l'électricité statique. Avant de sortir la caméra de son sac antistatique gris, assurez-vous de vous être déchargé en touchant un objet mis à la terre (par exemple un radiateur ou un châssis de PC).

2. Installez le module de caméra Raspberry Pi en insérant le câble dans le Raspberry Pi. Le câble s'insère dans le connecteur situé entre les ports Ethernet et HDMI, les connecteurs argentés faisant face au port HDMI.

3. Démarrez votre Raspberry Pi.

4. À partir de l'invite, exécutez « sudo raspi-config ». Si l'option "caméra" n'est pas répertoriée, vous devrez exécuter quelques commandes pour mettre à jour votre Raspberry Pi. Exécutez "sudo apt-get update" et "sudo apt-get upgrade"

5. Exécutez à nouveau "sudo raspi-config" - vous devriez maintenant voir l'option "caméra".

COMMANDE-

$ sudo raspi-config 

6. Accédez à l'option "caméra" et activez-la (regardez dans l'option d'interfaçage) . Sélectionnez « Terminer » et redémarrez votre Raspberry Pi ou tapez simplement ce qui suit :

$ sudo reboot 
  • Étape 2 :OUVRIR L'INSTALLATION DU CV

Si c'est la première fois que vous installez OpenCV ou si vous commencez tout juste avec Rasbian Stretch. C'est le tutoriel parfait pour vous.

Étape 1 :Développez le système de fichiers

Utilisez-vous une toute nouvelle installation de Raspbian Stretch ? Si c'est le cas, la première chose à faire est d'étendre votre système de fichiers pour inclure tout l'espace disponible sur votre carte micro-SD :

COMMANDE-

$ sudo raspi-config 

puis sélectionnez l'élément de menu "Options avancées" et suivi de la sélection "Développer le système de fichiers". Une fois que vous y êtes invité, vous devez sélectionner la première option, « A1. Développez le système de fichiers", appuyez sur Entrée sur votre clavier, flèche vers le bas jusqu'au bouton "", puis redémarrez votre Pi. Si vous utilisez une carte de 8 Go, vous utilisez peut-être près de 50 % de l'espace disponible, donc une chose simple à faire est de supprimer à la fois LibreOffice et le moteur Wolfram pour libérer de l'espace sur votre PI :

COMMANDE-

$ sudo apt-get purge wolfram-engine $ sudo apt-get purge libreoffice* $ sudo apt-get clean$ sudo apt-get autoremove 

Après avoir supprimé Wolfram Engine et LibreOffice, vous pouvez récupérer près de 1 Go !

Étape 2 : Installer les dépendances

Ce n'est pas la première fois que j'explique comment installer OpenCV sur le Raspberry Pi, je vais donc garder ces instructions plus brèves, vous permettant de suivre le processus d'installation :j'ai également inclus le temps il faut exécuter chaque commande (certaines dépendent de votre vitesse Internet) afin que vous puissiez planifier votre installation OpenCV + Raspberry Pi 3 en conséquence (OpenCV lui-même prend environ 4 heures à compiler - nous en parlerons plus tard). La première étape consiste à mettre à jour et à mettre à niveau tous les packages existants :

COMMANDE-

$ sudo apt-get update &&sudo apt-get upgrade  

Nous devons ensuite installer certains outils de développement, dont CMake, qui nous aide à configurer le processus de construction d'OpenCV :Raspbian Stretch :installez OpenCV 3 + Python sur votre Raspberry Pi

COMMANDE-

$ sudo apt-get install build-essential cmake pkg-config 

Ensuite, nous devons installer des packages d'E/S d'image qui nous permettent de charger divers formats de fichiers image à partir du disque. Des exemples de tels formats de fichiers incluent JPEG, PNG, TIFF, etc. :Raspbian Stretch

COMMANDE-

$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev 

Tout comme nous avons besoin de packages d'E/S d'image, nous avons également besoin de packages d'E/S vidéo. Ces bibliothèques nous permettent de lire divers formats de fichiers vidéo à partir du disque ainsi que de travailler directement avec des flux vidéo

COMMANDE-

$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev $ sudo apt-get install libxvidcore-dev libx264-dev 

La bibliothèque OpenCV est livrée avec un sous-module nommé highgui qui est utilisé pour afficher des images sur notre écran et créer des interfaces graphiques de base. Afin de compiler le module highgui, nous devons installer la bibliothèque de développement GTK :Raspbian Stretch :Installer OpenCV 3 + Python sur votre Raspberry Pi

COMMANDE-

$ sudo apt-get install libgtk2.0-dev libgtk-3-dev 

De nombreuses opérations à l'intérieur d'OpenCV (à savoir les opérations matricielles) peuvent être optimisées davantage en installant quelques dépendances supplémentaires :

COMMANDE-

$ sudo apt-get install libatlas-base-dev gfortran 

Ces bibliothèques d'optimisation sont particulièrement importantes pour les appareils à ressources limitées tels que le Raspberry Pi. Enfin, installons à la fois les fichiers d'en-tête Python 2.7 et Python 3 afin de pouvoir compiler OpenCV avec les liaisons Python :Raspbian Stretch

COMMANDE-

$ sudo apt-get install python2.7-dev python3-dev  

Si vous travaillez avec une nouvelle installation du système d'exploitation, il est possible que ces versions de Python soient déjà à la version la plus récente (vous verrez un message de terminal l'indiquant). Si vous ignorez cette étape, vous remarquerez peut-être une erreur liée au fichier d'en-tête Python.h introuvable lors de l'exécution de make pour compiler OpenCV. Étape 3 : Téléchargez le code source OpenCV

Étape 3 : Télécharger l'OpenCV code source

Maintenant que nos dépendances sont installées, récupérons l'archive 3.3.0 d'OpenCV dans le référentiel officiel OpenCV. Cette version inclut le module dnn dont nous avons parlé dans un article précédent où nous avons fait du Deep Learning avec OpenCV (Remarque : à mesure que les futures versions d'openCV seront publiées, vous pouvez remplacer la 3.3.0 par le dernier numéro de version) :

COMMANDE-

$ cd ~ $ wget -O opencv.zip   https://github.com/Itseez/opencv/archive/3.3.0.zi...>> p$ décompressez opencv.zip

Nous voudrons l'installation complète d'OpenCV 3 (pour avoir accès à des fonctionnalités telles que SIFT et SURF, par exemple), nous devons donc également récupérer le référentiel opencv_contrib :Raspbian Stretch :installez OpenCV 3 + Python sur votre Raspberry Pi

COMMANDE-

$ wget -O opencv_contrib.zip   https://github.com/Itseez/opencv_contrib/archive/...>>3.3.0$ unzip opencv_contrib.zip 

Vous devrez peut-être développer la commande ci-dessus en utilisant le bouton « <=> » lors de votre copier-coller. Le .zip du 3.3.0.zip peut sembler coupé dans certains navigateurs. L'URL complète de l'archive OpenCV 3.3.0 est :https://github.com/Itseez/opencv_contrib/archive/... Remarque :Assurez-vous que vos versions opencv et opencv_contrib sont les mêmes (dans ce cas, 3.3.0) . Si les numéros de version ne correspondent pas, vous rencontrerez probablement des erreurs de compilation ou d'exécution. Étape n°4 :Python 2.7 ou Python 3 ? Avant de pouvoir commencer à compiler OpenCV sur notre Raspberry Pi 3, nous devons d'abord installer pip , un gestionnaire de paquets Python

COMMANDE-

$ wget    https://bootstrap.pypa.io/get-pip.py> 
>>
>$ sudo python get-pip.py $ sudo python3 get-pip.py 

Vous pouvez recevoir un message indiquant que pip est déjà à jour lors de l'émission de ces commandes, mais il est préférable de ne pas sauter cette étape. Si vous êtes un lecteur de longue date de PyImageSearch, vous saurez que je suis un grand fan de virtualenv et de virtualenvwrapper.

L'installation de ces packages n'est pas obligatoire et vous pouvez absolument installer OpenCV sans eux, mais cela dit, je vous recommande fortement de les installer car d'autres didacticiels PyImageSearch existants (ainsi que les futurs didacticiels) exploitent également les environnements virtuels Python.

Je suppose également que vous avez à la fois virtualenv et virtualenvwrapper installés dans le reste de ce guide. Alors, étant donné cela, quel est l'intérêt d'utiliser virtualenv et virtualenvwrapper ? Tout d'abord, il est important de comprendre qu'un environnement virtuel est un outil spécial utilisé pour conserver les dépendances requises par différents projets dans des endroits séparés en créant des environnements Python isolés et indépendants pour chacun d'eux. En bref, cela résout le dilemme « Le projet X dépend de la version 1.x, mais le projet Y a besoin de 4.x ».

Il maintient également vos packages de sites mondiaux propres, bien rangés et sans encombrement. Si vous souhaitez une explication complète sur les raisons pour lesquelles les environnements virtuels Python sont une bonne pratique, lisez absolument cet excellent article de blog sur RealPython. C'est une pratique courante dans la communauté Python d'utiliser des environnements virtuels quelconques, je vous recommande donc fortement de faire de même :

COMMANDE-

$ sudo pip install virtualenv virtualenvwrapper$ sudo rm -rf ~/.cache/pip  

Maintenant que virtualenv et virtualenvwrapper ont été installés, nous devons mettre à jour notre fichier ~/.profile. inclure les lignes suivantes au bas du fichier :Raspbian Stretch

COMMANDE-

$ nano ~/.profile 

Copiez et collez les lignes suivantes en bas du fichier :

COMMANDE-

# virtualenv et virtualenvwrapperWORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh  

OU

Vous devez simplement utiliser cat et la redirection de sortie pour gérer la mise à jour de ~/.profile :

COMMANDE-

$ echo -e "\n# virtualenv et virtualenvwrapper">> ~/.profile $ echo "exportWORKON_HOME=$HOME/.virtualenvs">> ~/.profile$ echo "source /usr/local/ bin/virtualenvwrapper.sh">> ~/.profile  

Maintenant que notre ~/.profile est mis à jour, nous devons le recharger pour nous assurer que les modifications prennent effet. Vous pouvez forcer le rechargement de votre fichier ~/.profile en :vous déconnectant puis vous reconnectant.

Fermer une instance de terminal et en ouvrir une nouvelle

Ou mon préféré

COMMANDE-

$ source ~/.profile  

Remarque :Je recommande d'exécuter le fichier source ~/.profile chaque fois que vous ouvrez un nouveau terminal pour vous assurer que vos variables système ont été correctement configurées. Création de votre environnement virtuel Python Ensuite, créons l'environnement virtuel Python que nous utiliserons pour le développement de la vision par ordinateur :

COMMANDE-

$ mkvirtualenv cv -p python2  

Cette commande créera un nouvel environnement virtuel Python nommé cv en utilisant Python 2.7.

Si vous souhaitez plutôt utiliser Python 3, utilisez plutôt cette commande :

COMMANDE-

$ mkvirtualenv cv -p python3 

Encore une fois, je ne saurais trop insister sur ce point :l'environnement virtuel cv Python est entièrement indépendant et séquestré de la version Python par défaut incluse dans le téléchargement de Raspbian Stretch.

Les packages Python du répertoire global site-packages ne seront pas disponibles pour l'environnement virtuel cv. De même, tous les packages Python installés dans les packages de site de cv ne seront pas disponibles pour l'installation globale de Python.

Gardez cela à l'esprit lorsque vous travaillez dans votre environnement virtuel Python et cela vous évitera beaucoup de confusion et de maux de tête. Comment vérifier si vous êtes dans l'environnement virtuel "cv" Si jamais vous redémarrez votre Raspberry Pi; déconnectez-vous et reconnectez-vous ; or open up a new terminal, you’ll need to use the workon command to re-access the cv virtual environment.

In previous blog posts, I’ve seen readers use the mkvirtualenv command — this is entirely unneeded! Themkvirtualenv command is meant to be executed only once:to actually create the virtual environment. After that, you can use workon and you’ll be dropped down into your virtual environment:

COMMAND-

$ source ~/.profile $ workon cv 

To validate and ensure you are in the cv virtual environment, examine your command line — if you see the text (cv) preceding your prompt, then you are in the cv virtual environment:Make sure you see the “(cv)” text on your prompt, indicating that you are in the cv virtual environment.

Otherwise, if you do not see the (cv) text, then you are not in the cv virtual environment:

If you do not see the “(cv)” text on your prompt, then you are not in the cv virtual environment and need to run “source” and “workon” to resolve this issue. To fix this, simply execute the source and workon commands mentioned above. Installing NumPy on your Raspberry Pi Assuming you’ve made it this far, you should now be in the cv virtual environment (which you should stay in for the rest of this tutorial).

Step #4 :Installing NumPy on your Raspberry Pi

Our only Python dependency is NumPy, a Python package used for numerical processing:

COMMAND-

$ pip install numpy  

the NumPy installation can take a bit of time.

Step #5:Compile and Install OpenCV

COMMAND-

$ workon cv 

Once you have ensured you are in the cv virtual environment, we can setup our build using CMake:

COMMAND-

$ cd ~/opencv-3.3.0/ $ mkdir build $ cd build $ cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.0/modules \ -D BUILD_EXAMPLES=ON .. 

Now, before we move on to the actual compilation step, make sure you examine the output of CMake! Start by scrolling down the section titled Python 2 and Python 3 . If you are compiling OpenCV 3 for Python 2.7, then make sure your Python 2 section includes valid paths to the Interpreter, Libraries, numpy and packages

Checking that Python 3 will be used when compiling OpenCV 3 for Raspbian Stretch on the Raspberry Pi 3. Notice how the Interpreter points to our python2.7 binary located in the cv virtual environment. The numpy variable also points to the NumPy installation in the cv environment.

Again, the Interpreter points to our python3.5 binary located in the cv virtual environment while numpy points to our NumPy install.

In either case, if you do not see the cv virtual environment in these variables paths, it’s almost certainly because you are NOT in the cv virtual environment prior to running CMake! If this is the case, access the cv virtual environment using workon cv and re-run the cmake command outlined above.

Configure your swap space size before compiling Before you start the compile process, you should increase your swap space size. This enables OpenCV to compile with all four cores of the Raspberry PI without the compile hanging due to memory problems.

Open your /etc/dphys-swapfile and then edit the CONF_SWAPSIZE variable

COMMAND-

$ nano /etc/dphys-swapfile  

and then edit the following section of the file:#set size to absolute value, leaving empty (default) then uses computed value # you most likely don't want this, unless you have an special disk situation

# CONF_SWAPSIZE=100 CONF_SWAPSIZE =1024 

Notice that I’ve commented out the 100MB line and added a 1024MB line. This is the secret to getting compiling with multiple cores on the Raspbian Stretch. If you skip this step, OpenCV might not compile.

To activate the new swap space, restart the swap service:

COMMAND-

$ sudo /etc/init.d/dphys-swapfile stop $ sudo /etc/init.d/dphys-swapfile start  

Note:It is possible to burn out the Raspberry Pi microSD card because flash memory has a limited number of writes until the card won’t work. It is highly recommended that you change this setting back to the default when you are done compiling and testing the install (see below). To read more about swap sizes corrupting memory, see this page. Finally, we are now ready to compile OpenCV:

COMMAND-

$ make -j4 

The -j4 switch stands for the number of cores to use when compiling OpenCV. Since we are using a Raspberry Pi 2, we’ll leverage all four cores of the processor for a faster compilation.

However, if your make command errors out, I would suggest starting the compilation over again and only using one core

$ make clean$ make  

Once OpenCV 3 has finished compiling.Our OpenCV 3 compile on Raspbian Stretch has completed successfully.

From there, all you need to do is install OpenCV 3 on your Raspberry Pi 3:

COMMAND-

$ sudo make install$ sudo ldconfig  

Step #6 :Finish installing OpenCV on your Pi

We’re almost done — just a few more steps to go and you’ll be ready to use your Raspberry Pi 3 with OpenCV 3 on Raspbian Stretch.

For Python 2.7:

#5 Provided your Step without error, OpenCV should now be installed in/usr/local/lib/python2.7/site-pacakges . You can verify this using the ls command:

COMMAND-

$ ls -l /usr/local/lib/python2.7/site-packages/ total 1852 -rw-r--r-- 1 root staff 1895772 Mar 20 20:00 cv2.so  

Note:In some cases, OpenCV can be installed in /usr/local/lib/python2.7/dist-packages(note the dist-packages rather than site-packages ). If you do not find the cv2.so bindings insite-packages , we be sure to check dist-packages . Our final step is to sym-link the OpenCV bindings into our cv virtual environment for Python 2.7:

COMMAND-

$ cd ~/.virtualenvs/cv/lib/python2.7/site-packages/ $ ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so  

For Python 3:After running make install , your OpenCV + Python bindings should be installed in/usr/local/lib/python3.5/site-packages . Again, you can verify this with the ls command:

COMMAND-

$ ls -l /usr/local/lib/python3.5/site-packages/ total 1852 -rw-r--r-- 1 root staff 1895932 Mar 20 21:51 cv2.cpython-34m.so  

I honestly don’t know why, perhaps it’s a bug in the CMake script, but when compiling OpenCV 3 bindings for Python 3+, the output .so file is named cv2.cpython-35m-arm-linux-gnueabihf.so(or some variant of) rather than simply cv2.so (like in the Python 2.7 bindings). Again, I’m not sure exactly why this happens, but it’s an easy fix. All we need to do is rename the file:

COMMAND-

$ cd /usr/local/lib/python3.5/site-packages/ $ sudo mv cv2.cpython-35m-arm-linux-gnueabihf.so cv2.so  

After renaming to cv2.so , we can sym-link our OpenCV bindings into the cv virtual environment

for Python 3.5:

COMMAND-

$ cd ~/.virtualenvs/cv/lib/python3.5/site-packages/ $ ln -s /usr/local/lib/python3.5/site-packages/cv2.so cv2.so  

Step #7:Testing your OpenCV 3 install

Congratulations, you now have OpenCV 3 installed on your Raspberry Pi 3 running Raspbian Stretch! But before we pop the champagne and get drunk on our victory, let’s first verify that your OpenCV installation is working properly.

Open up a new terminal, execute the source and workon commands, and then finally attempt to import the Python + OpenCV bindings:

COMMAND-

$ source ~/.profile$ workon cv $ python>>> import cv2>>> cv2.__version__ '3.3.0'>>>  

OpenCV 3 has been successfully installed on my Raspberry Pi 3 + Python 3.5 environment . Once OpenCV has been installed, you can remove both the opencv-3.3.0 and opencv_contrib-3.3.0 directories to free up a bunch of space on your disk:

COMMAND-

$ rm -rf opencv-3.3.0 opencv_contrib-3.3.0  

However, be cautious with this command! Make sure OpenCV has been properly installed on your system before blowing away these directories. A mistake here could cost you hours in compile time.

Open your /etc/dphys-swapfile and then edit the CONF_SWAPSIZE variable COMMAND-

# set size to absolute value, leaving empty (default) then uses computed value# you most likely don't want this, unless you have an special disk situation CONF_SWAPSIZE=100 #CONF_SWAPSIZE=1024 

Notice that I’ve commented out the 1024MB line and uncommented the 100MB line. As stated above, larger swap spaces may lead to memory corruption, so I recommend setting it back to 100MB. If you skip this step, your memory card won’t last as long. To revert to the smaller swap space, restart the swap service

COMMAND-

$ sudo /etc/init.d/dphys-swapfile stop
$ sudo /etc/init.d/dphys-swapfile start
  • STEP 4:Setting Up Python Program

You can verify that the camera works by running.

COMMAND-

$ raspistill -o image.jpg 

which will save a image from the camera in your current directory.

After you checked the camera is working. Now download all the python files and models from below link :

LINK:

https://drive.google.com/file/d/0B98uoD6BbkpqZU9FT...

You can open up the file inspector and view the image.

Make sure you are using the virtual environment by typing the following commands:

COMMANDS-

$ source ~/.profile $ workon cv  

Next, navigate to the repository directory,

COMMANDS-

$ cd Smart-Security-Camera  

and install the dependencies for the project

COMMANDS-

$ pip install -r requirements.txt  

To get emails when objects are detected, you'll need to make a couple modifications to the mail.py file. Open mail.py with vim vim mail.py , then press i to edit. Scroll down to the following section

# Email you want to send the update from (only works with gmail)fromEmail ='[email protected]' fromEmailPassword ='password1234' # Email you want to send the update to toEmail ='[email protected]'  

and replace with your own email/credentials.

The mail.py file logs into a gmail SMTP server and sends an email with an image of the object detected by the security camera. Press esc then ZZ to save and exit.

You can also modify the main.py file to change some other properties.

email_update_interval =600 # sends an email only once in this time intervalvideo_camera =VideoCamera(flip=True) # creates a camera object, flip verticallyobject_classifier =cv2.CascadeClassifier("models/fullbody_recognition_model.xml") # an opencv classifier facial_recognition_model.xml fullbody_recognition_model.xml upperbody_recognition_model.xml 

Run the program python main.py

You can view a live stream by visiting the IP address of your pi in a browser on the same network. You can find the IP address of your Raspberry Pi by typing ifconfig in the terminal and looking for the inet address. Visit :5000 in your browser to view the stream.

Note:

To view the live stream on a different network than your Raspberry Pi, you can use ngrok to expose a local tunnel. Once downloaded, run ngrok with ./ngrok http 5000 and visit one of the generated links in your browser. Note:The video stream will not start automatically on startup. To start the video stream automatically, you will need to run the program from your /etc/rc.local file see this video for more information about how to configure that. Receiving Emails When receiving an email for the first time, you might get the following notification from Google:

By default, Google blocks apps from using SMTP without permissions. We can solve this by clicking on the allow "less secure apps" link and toggle the feature on. The next object detected will send an email.

STEP 4:Blynk App Interface Setup

This is one of the easiest and fun steps. Alors, commençons. Shall we?

  • Downloading the Blynk App is the first obvious step. Download it from App Store or Google Play Store. Sign Up or Login in the app to get started.
  • Click on New Project to create a new project. Name it whatever you like. In devices Choose NodeMCU. In connection type choose WiFi and click on Create.
  • Now you will get a Auth key on your Email. Make sure to copy that and add that to your code.
  • Now click on the + sign to add widgets. You may need to buy some energy!
  • Now add three Gauge's. Click on of the Gauge's, name it Temperature. Choose a color of you choice for this gauge. In the pin choose Virtual Pin V6. Set the range from 0 to 50 °C ( not sure for °F), make the label °C/ °F and keep the reading rate to Push.
  • Repeat this for other two Gauges using data as shown in the pictures.
  • Now, add a zeRGBa and set R to digital Pin GP15, B to GP3 and B to GP1.
  • Now add 4 Buttons, change there colors accordingly. Set them as shown in the pictures.
  • Add a SuperChart, add 3 data streams Temperature, Humidity and gas, set there colors, there pins, Range and Suffix.
  • Now, add tabs. Go to the second tab and add Twitter, Notifications, Email and Eventor. In Twitter add you twitter username and password. In Notifications, Switch on Notify when hardware goes off. In Email, set your Email address. In Eventor you can set many triggers, see the picture for the triggers that I have set up.
  • You are done. now click on the play button to use the interface that you have created. You can change the interface as you like. It is really simple and fun process!

STEP 5:Making Octopod Structure

Warning - This is going to be one of most time-consuming process!

NOTE:You can skip this step and 3D print the enclosure that I have provided!

Actually, this step is optional yet the most important step! You can just take a shoe box and avoid all of this hard work. But on the contrary, this hard work makes the project unique. The idea for this unique design striked me while, I was doing my math homework. This shape is inspired from an octagon. Rather, This is a 3D octagon! Alors commençons !

Making the Structure:

  • Take your cardboard and draw a rectangle of 9 cm x 9.5 cm (You can change the dimensions as per your convince). Now, joining end to end draw 4 of theses similar rectangles (8 if your cardboard is long enough).
  • Now make partial cuts (somewhat like paper creases) in between these rectangles and cut out this whole long piece. Repeat this process until you have 4 of these long pieces.
  • Now, using a D draw a 135° and cut it out as shown in the images. Make 16 of these same angles.
  • Using Glue gun glue these angles in between the small pieces. Repeat this for all the joints.
  • Now using glue gun join 2 of these open structures to make a closed structure (somewhat octagon) .
  • Now glue the other two open structure perpendicularly, making a 3-D shape.
  • Now Cut 4 More pieces of of 9 x 9.5 cm and glue them in between all the empty spaces.
  • Now you will be left with only 8 open triangles. Using Acrylic Butter paper cut 8 triangles, which will fit on these open areas, but don't glue them now.

Paint Job:

For this you need to head out towards an open area! Wear your Mask and Gloves and just make one coat over the structure that you have created. You can go to Youtube, to learn proper ways to make a perfect coat. Now let this dry for 4- 5 Hours and then apply 1 more coat. I think 3 coats will be good for this.

That's it! You have arrived with a unique piece of art.

STEP 6:Making Door Lock Enclosure

Really simple. Just take a Shoe Box and apply 2- 3 even coats of spray. And maybe for design make check pattern using duck tape like we did!

STEP 7:Assembling the Octopod

I have tried to make this step as simple as possible, by making the schematic diagram. Refer the picture or the file, and make connections accordingly. I will briefly explain all the connections!

  • We have connected the nodeMCU to a large size Solderless Breadboard. We have also connected Breadboard power supply on the breadboard. NodeMCU, all the sensors, LED's and other components are powered by the power supply.
  • Following are the sensor connections:DHT11D4 / GP2 MQ2A0 / adc00 Soil Moisture SensorD2 / GP4 PIRD6 / GP1 RGB R → D8 / GP15, G → Rx / GP3, B → Tx / GP1 RelayLn1D0 / GP16, Ln2D5 / GP14 Make the following connections.
  • For powering this you can use Power Bank or a Wall Adapter, which will be connected to the breadboard Power supply.
  • Now, take your Raspberry Pi along with the Raspberry Pi Camera. Make a small hole in one of the walls of the cardboard and glue or tape your Raspberry Camera.

Now, insert all these electronics inside, through any open triangle and close the triangle by using the cut outs of acrylic butter paper that we made. It is better to leave 1 or 2 open, in case something inside needs to be fixed! Also let the prongs of the Soil Moisture Sensor sit outside.

All done! We have completed the making process of the Octopod! Now, Just switch On the power and keep your Octopod over the dining Table or maybe on the Guest's Table and enjoy! To see the live feed from the Raspberry Pi, just open a browser and put in the IP address of the Pi. Enjoy!

STEP 8:Assembling the Door Lock

After uploading the code on your Arduino just make the connections as shown in the picture or in fritzing file! It is quite simple. Then take the handy shoe box that we made make 2 holes in it for the LED's to pop out. and allow the servo to stand out. These days mechanical locks like servo's are also available in the market, though servo works just as fine. This is just an experiment, so please so please don't use this as you actual lock! Glue the Rfid to one wall of the box and also glue the small breadboard and Arduino. You can use a wall adapter or a Power bank to power this. Just power the Arduino and you will be good to go! Done!

CONCLUSION:

This was a really fun project to do!

I was really happy how it turned out. I think the lights look really well, and i think its well worth making even one of these as a side lamp. I really can't thank creators of Blynk and OpenCV libraries enough, they are both really excellent pieces of software and made this project possible! As always, if you have any questions on any part of the process please let me know and I will be happy to try help. Thanks a lot! And Please Vote for Us!

-Saksham

Arduino Blog

Full Instructable

UPDATE:

I have been working on integrating this system with Amazon Alexa, I am almost done. Will upload the code in 2-3 days!

Code

  • octopod.ino
  • octopod_door.ino
  • octopod_door_bluetooth.ino
octopod.inoArduino
This is the main code for Arduino MKR 1010 (NodeMCU in my case)
If you are using MAX32620FTHR, download libraries for it. Then change the board in board settings. Also change the pin as given bellow
ESP MAX
AO - - - - - - - - - - - - GPIO2
A1 - - - - - - - - - - - - - GPIO1

Soil Sensor MAX
analog sensor - - - GPIO3

Gas Sensor (MQ2) MAX
sensor - - - - - - - - - - - GPIO4

PIR Sensor MAX
sensor - - - - - - - - - - - -GPIO0

Relay MAX
1 - - - - - - - - - - - - - - - - - M0
2 - - - - - - - - - - - - - - - - - M1
/*************************************************************************** OCTOPOD:A SMART HOME AUTOMATION PROJECT MADE BY SAKSHAM Download latest Blynk library here:https://github.com/blynkkk/blynk-library/releases/latestDownload latest DHT Sensor library here:https://github.com/adafruit/DHT-sensor-library***************************************************************************/#include  //Include ESP8266 Wifi Library#include  //Include Blynk Library#include  //Include DHT sensor library#define BLYNK_PRINT Serial// You should get Auth Token in the Blynk App.// Go to the Project Settings (nut icon).char auth[] ="Your Blynk Auth Key";// Your WiFi credentials.// Set password to "" for open networks.char ssid[] ="Your WiFi SSID";char pass[] ="Your WiFi Password";#define DHTPIN 2 // What digital pin temperature and humidity sensor is connected to#define soilPin 4 // What digital pin soil moist ure sensor is connected to#define gasPin A0 // What analog pin gas sensor is connected to#define pirPin 12 // What digital pin soil moisture sensor is connected to int pirValue; // Place to store read PIR Valueint soilValue; // Place to store read Soil Moisture Valueint PIRpinValue; // Place to store the value sent by Blynk App Pin V0int SOILpinValue; // Place to store the value sent by Blynk App Pin V1// Uncomment whatever type you're using!#define DHTTYPE DHT11 // DHT 11//#define DHTTYPE DHT22 // DHT 22, AM2302, AM2321//#define DHTTYPE DHT21 // DHT 21, AM2301DHT dht(DHTPIN, DHTTYPE);BlynkTimer timer;// This function sends Arduino's up time every second to Virtual Pin (5).// In the app, Widget's reading frequency should be set to PUSH. This means// that you define how often to send data to Blynk App.BLYNK_WRITE(V0) //VO pin from Blynk app tells if Motion Detection is ON{ PIRpinValue =param.asInt(); } BLYNK_WRITE(V1) //V1 pin from Blynk app tells if Soil Moisture is ON{ SOILpinValue =param.asInt(); } void sendSensor(){ int h =dht.readHumidity(); int t =dht.readTemperature(); // ou dht.readTemperature(true) pour Fahrenheit if (isnan(h) || isnan(t)) { Serial.println("Échec de la lecture depuis le capteur DHT !"); // to check if sensor is not sending any false values return; } // Vous pouvez envoyer n'importe quelle valeur à tout moment. // Veuillez ne pas envoyer plus de 10 valeurs par seconde. Blynk.virtualWrite(V5, h); // send humidity to pin V5 Blynk.virtualWrite(V6, t); // send temperature to pin V7}void getPirValue(void){ pirValue =digitalRead(pirPin); if (pirValue) //digital pin of PIR gives high value on human detection { Serial.println("Motion detected"); Blynk.notify("Motion detected"); }}void getSoilValue(void){ soilValue =digitalRead(soilPin); if (soilValue ==HIGH) //digital pin of soil sensor give low value when humidity is less { Serial.println("Water Plants"); Blynk.notify("Water Plants"); }}void setup(){ // Debug console Serial.begin(9600); Blynk.begin(auth, ssid, pass); // You can also specify server://Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442); dht.begin(); // Begins DHT reading Blynk.tweet("OCTOPOD IS ONLINE! "); // Tweating on your Twitter Handle that you project is online pinMode(pirPin,INPUT); // Defining that Pir Pin is meant to take Input Only pinMode(soilPin,INPUT); // Defining that Soil Sensor Pin is meant to take Input Only // Setup a function to be called every second timer.setInterval(1000L, sendSensor);}void loop(){ Blynk.run(); timer.run(); if (PIRpinValue ==HIGH) //VO pin from Blynk app tells if Motion Detection is ON { getPirValue(); } if (SOILpinValue ==HIGH) //V1 pin from Blynk app tells if Soil Moisture is ON { getSoilValue(); } }
octopod_door.inoArduino
Code for Automatic Door Lock Control (NO BLUETOOTH VERSION)
/*********************************************************************************************************** OCTOPOD:A SMART HOME AUTOMATION PROJECT MADE BY SAKSHAM ARDUINO RFID DOOR LOCK CODELibrary Required - MFRC522 ************************************************************************************************************/#include #include #include  #define SS_PIN 10#define RST_PIN 9#define LED_G 5 //define green LED pin#define LED_R 4 //define red LED#define BUZZER 2 //buzzer pinMFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.Servo myServo; //define servo name void setup() { Serial.begin(9600); // Initiate a serial communication SPI.begin(); // Initiate SPI bus mfrc522.PCD_Init(); // Initiate MFRC522 myServo.attach(3); //servo pin myServo.write(0); //servo start position pinMode(LED_G, OUTPUT); pinMode(LED_R, OUTPUT); pinMode(BUZZER, OUTPUT); noTone(BUZZER); Serial.println("Put your card to the reader..."); Serial.println();}void loop() { // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //Show UID on serial monitor Serial.print("UID tag :"); String content=""; lettre d'octet ; for (byte i =0; i  
octopod_door_bluetooth.inoArduino
Code for Automatic Door Lock Control (Bluetooth Version)
/*********************************************************************************************************** OCTOPOD:A SMART HOME AUTOMATION PROJECT MADE BY SAKSHAM ARDUINO RFID DOOR LOCK CODELibrary Required - MFRC522 ************************************************************************************************************/#include SoftwareSerial BTserial(0, 1); // RX | TX#include #include #include #define SS_PIN 10#define RST_PIN 9#define LED_G 5 //define green LED pin#define LED_R 4 //define red LED#define BUZZER 2 //buzzer pinMFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.Servo myServo; //define servo namevoid setup(){ BTserial.begin(9600); // Initiate a serial communication BTserial.println("Waiting for connections..."); SPI.begin(); // Initiate SPI bus mfrc522.PCD_Init(); // Initiate MFRC522 myServo.attach(3); //servo pin myServo.write(0); //servo start position pinMode(LED_G, OUTPUT); pinMode(LED_R, OUTPUT); pinMode(BUZZER, OUTPUT); noTone(BUZZER); BTserial.println("Put your card to the reader..."); BTserial.println();}void loop(){ // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //Show UID on serial monitor BTserial.print("UID tag :"); String content =""; lettre d'octet ; for (byte i =0; i  

Pièces et boîtiers personnalisés

This is the basic design that you can use if you want to make the enclosure out of Cardboard/ Wood like me! octopod_v2_ukTmIJ0uMl.f3dProper Enclosure that you can 3D Print! octo_2_v3_sii4tuCF7d.f3d

Schémas

Pin configuration might be different with Arduino MKR 1010 Without Bluetooth
For Bluetooth connect Rx (HC-05) --> Tx (Arduino)
Tx (HC-05) --> Rx (Arduino)
and 5v to 5v
Ground to Ground ESP MAX
AO - - - - - - - - - - - - GPIO2
A1 - - - - - - - - - - - - - GPIO1

Soil Sensor MAX
analog sensor - - - GPIO3

Gas Sensor (MQ2) MAX
sensor - - - - - - - - - - - GPIO4

PIR Sensor MAX
sensor - - - - - - - - - - - -GPIO0

Relay MAX
1 - - - - - - - - - - - - - - - - - M0
2 - - - - - - - - - - - - - - - - - M1

Processus de fabrication

  1. Applications de la domotique
  2. Les publicités malveillantes insidieuses s'attaquent à l'IoT pour la maison intelligente
  3. DOMOMATISATION RASPBERRY PI
  4. Stores intelligents
  5. IOT - Smart Jar utilisant ESP8266, Arduino et capteur à ultrasons
  6. Système de domotique et de sécurité intelligent utilisant 1Sheeld
  7. Tech-TicTacToe
  8. Serrure de porte intelligente utilisant la page de connexion WiFi par Arduino et ESP8266
  9. L'automatisation dans l'industrie 4.0