

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
	<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
	<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
	<!ENTITY swivt 'http://semantic-mediawiki.org/swivt/1.0#'>
	<!ENTITY wiki 'http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/'>
	<!ENTITY category 'http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Category-3A'>
	<!ENTITY property 'http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3A'>
	<!ENTITY wikiurl 'https://www.wikidebrouillard.org/wiki/'>
]>

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:swivt="&swivt;"
	xmlns:wiki="&wiki;"
	xmlns:category="&category;"
	xmlns:property="&property;">

	<owl:Ontology rdf:about="https://www.wikidebrouillard.org/wiki/Special:ExportRDF/Utilisation_d-27un_capteur">
		<swivt:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2026-04-30T23:44:28+02:00</swivt:creationDate>
		<owl:imports rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:Ontology>
	<swivt:Subject rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Utilisation_d-27un_capteur">
		<rdf:type rdf:resource="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Category-3ATutorials"/>
		<rdfs:label>Utilisation d'un capteur</rdfs:label>
		<rdfs:isDefinedBy rdf:resource="https://www.wikidebrouillard.org/wiki/Special:ExportRDF/Utilisation_d-27un_capteur"/>
		<swivt:page rdf:resource="https://www.wikidebrouillard.org/wiki/Utilisation_d-27un_capteur"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">0</swivt:wikiNamespace>
		<swivt:wikiPageContentLanguage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">fr</swivt:wikiPageContentLanguage>
		<property:Avertissement rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Vérifies tes branchements.

Vérifies dans ton code que les pins que tu renseignes correspondent à tes branchements.</property:Avertissement>
		<property:Complete rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Draft</property:Complete>
		<property:Description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Mesurer des données à l'aide d'un ESP32.</property:Description>
		<property:Difficulty rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Easy</property:Difficulty>
		<property:Disciplines_scientifiques rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Arduino</property:Disciplines_scientifiques>
		<property:Disciplines_scientifiques rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Computing</property:Disciplines_scientifiques>
		<property:Disciplines_scientifiques rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Electricity</property:Disciplines_scientifiques>
		<property:Duration rdf:datatype="http://www.w3.org/2001/XMLSchema#double">15</property:Duration>
		<property:Duration-2Dtype rdf:datatype="http://www.w3.org/2001/XMLSchema#string">minute(s)</property:Duration-2Dtype>
		<property:Introduction rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Dans cette séance, tu vas écrire ton 1er programme. L'objectif est de connecter le microcontrôleur à un capteur de température.

Cela permettra de mesurer la température et de l'afficher dans la console.</property:Introduction>
		<property:Item rdf:resource="&wiki;Fil_électrique"/>
		<property:Item rdf:resource="&wiki;ESP32"/>
		<property:Item rdf:resource="&wiki;Capteur_d-27humidité-2DTempérature_DHT22"/>
		<property:Licences rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Attribution (CC-BY)</property:Licences>
		<property:Main_Picture rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utilisation_d_un_capteur_dblocadata.jpg</property:Main_Picture>
		<property:Observations rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Dans la console, tu verras s'afficher la temperature que mesure le capteur DHT.</property:Observations>
		<property:Prerequisites rdf:resource="&wiki;Présentation_de_DBLOCADATA"/>
		<property:Prerequisites rdf:resource="&wiki;Installation_de_micropython"/>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Ton capteur DHT possède 3 entrées/sorties. 


*Le courant ( + ou vdd )
*La masse ( - ou gnd )
*Le pin d'information ( out )


Relie le courant et la masse à leurs équivalents sur le microcontrôleur.


Pour le pin d'information tu as plusieurs choix possible, cela dépend de ton microcontrôleur .


Dans ce tutoriel on utilisera le pin 33.

&lt;br/&gt;</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Dans un premier temps, il nous faut initialiser le capteur. Pour cela direction la sidebar, dans l'onglet '''Capteurs''' '''-&gt;''' '''Temperature et Humidité''', ajoute le bloc '''Démarrer le capteur DHT'''.


L'objectif, ensuite, est de mesurer et d'afficher la température toutes les 5 secondes. Pour cela, tu dois effectuer une boucle.


Dans la sidebar, onglet '''Boucles''', ajoute le bloc '''Répéter tant que'''.

Puis dans l'onglet '''Logique''', ajoute le bloc '''vrai''' dans la condition de la boucle.


Tu as désormais ta boucle de prête. Il te reste encore à récupérer les données du capteur, les afficher et ajouter un délai de 5 secondes.


À partir de maintenant, je te laisse chercher les blocs dans la sidebar 😉


Ajoute le bloc '''mettre à jour DHT11/22''' dans la boucle.

Pour afficher les données, utilise le bloc '''afficher'''.

Pour récupérer les données, utilise le bloc '''récupérer DHT11/22 température'''

&lt;br/&gt;&lt;div class="icon-instructions caution-icon"&gt;
&lt;div class="icon-instructions-icon"&gt;&lt;i class="fa fa-exclamation-triangle"&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="icon-instructions-text"&gt;Attention ce bloc te renvoie un nombre, cependant, le bloc afficher ne prend que des chaînes de caractères en entrée. Il te faut donc convertir la temperature avant de l'afficher. Le bloc to_str fait exactement ça !&lt;/div&gt;
&lt;/div&gt;


Enfin, il faut ajouter un délais dans ta boucle pour ménager le microcontrôleur. Le bloc `delais` permet d'attendre un nombre de seconde défini.


Bravo tu as maintenant ton programme 🏆</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Si tu as bien suivi les étapes précédentes, ton programme doit maintenant ressembler à l'image ci-contre.


Maintenant tu peux executer le programme et voir le resultat dans la console.</property:Step_Content>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Branchements</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Programme</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Voir les données</property:Step_Title>
		<property:Has_query rdf:resource="&wiki;Utilisation_d-27un_capteur-23_QUERYaed63e1f6214d19eb561ba1eae2257ca"/>
		<property:Has_query rdf:resource="&wiki;Utilisation_d-27un_capteur-23_QUERY2a6b6e4b331c865b30ed6a2e2d54672a"/>
		<property:Has_query rdf:resource="&wiki;Utilisation_d-27un_capteur-23_QUERY50e9a179c214565b8620eb5604b5c81c"/>
		<swivt:wikiPageModificationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2023-04-25T08:32:35Z</swivt:wikiPageModificationDate>
		<property:Modification_date-23aux rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2460059.8559607</property:Modification_date-23aux>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utilisation d'un capteur</swivt:wikiPageSortKey>
		<property:Comments rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Comments>
		<property:Page_creator rdf:resource="&wiki;Utilisateur-3AAndréa_Bardinet"/>
		<property:I_did_it rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:I_did_it>
		<property:Favorites rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Favorites>
	</swivt:Subject>
	<swivt:Subject rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Utilisation_d-27un_capteur-23_QUERYaed63e1f6214d19eb561ba1eae2257ca">
		<swivt:masterPage rdf:resource="&wiki;Utilisation_d-27un_capteur"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">0</swivt:wikiNamespace>
		<property:Query_depth rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Query_depth>
		<property:Query_format rdf:datatype="http://www.w3.org/2001/XMLSchema#string">plainlist</property:Query_format>
		<property:Query_size rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1</property:Query_size>
		<property:Query_string rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[[:Item:ESP32]]</property:Query_string>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utilisation d'un capteur# QUERYaed63e1f6214d19eb561ba1eae2257ca</swivt:wikiPageSortKey>
	</swivt:Subject>
	<swivt:Subject rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Utilisation_d-27un_capteur-23_QUERY2a6b6e4b331c865b30ed6a2e2d54672a">
		<swivt:masterPage rdf:resource="&wiki;Utilisation_d-27un_capteur"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">0</swivt:wikiNamespace>
		<property:Query_depth rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Query_depth>
		<property:Query_format rdf:datatype="http://www.w3.org/2001/XMLSchema#string">plainlist</property:Query_format>
		<property:Query_size rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1</property:Query_size>
		<property:Query_string rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[[:Item:Capteur d'humidité-Température DHT22]]</property:Query_string>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utilisation d'un capteur# QUERY2a6b6e4b331c865b30ed6a2e2d54672a</swivt:wikiPageSortKey>
	</swivt:Subject>
	<swivt:Subject rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Utilisation_d-27un_capteur-23_QUERY50e9a179c214565b8620eb5604b5c81c">
		<swivt:masterPage rdf:resource="&wiki;Utilisation_d-27un_capteur"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">0</swivt:wikiNamespace>
		<property:Query_depth rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Query_depth>
		<property:Query_format rdf:datatype="http://www.w3.org/2001/XMLSchema#string">plainlist</property:Query_format>
		<property:Query_size rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1</property:Query_size>
		<property:Query_string rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[[:Item:Fil électrique]]</property:Query_string>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utilisation d'un capteur# QUERY50e9a179c214565b8620eb5604b5c81c</swivt:wikiPageSortKey>
	</swivt:Subject>
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#creationDate" />
	<owl:Class rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Category-3ATutorials" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#page" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiNamespace" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageContentLanguage" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AAvertissement" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AComplete" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ADescription" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ADifficulty" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ADisciplines_scientifiques" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ADuration" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ADuration-2Dtype" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AIntroduction" />
	<owl:ObjectProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AItem" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3ALicences" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AMain_Picture" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AObservations" />
	<owl:ObjectProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3APrerequisites" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AStep_Content" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AStep_Title" />
	<owl:ObjectProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AHas_query" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageModificationDate" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AModification_date-23aux" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageSortKey" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AComments" />
	<owl:ObjectProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3APage_creator" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AI_did_it" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AFavorites" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#masterPage" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AQuery_depth" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AQuery_format" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AQuery_size" />
	<owl:DatatypeProperty rdf:about="http://https://www.wikidebrouillard.org/wiki/Special:URIResolver/Property-3AQuery_string" />
	<!-- Created by Semantic MediaWiki, https://www.semantic-mediawiki.org/ -->
</rdf:RDF>