-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDHT22.tex
73 lines (58 loc) · 1.62 KB
/
DHT22.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
\begin{figure}[ht]
\centering
\includegraphics[scale=0.24]{images/DHT22_Steckplatine.png}
\includegraphics[scale=0.25]{images/DHT22_Schaltplan.png}
% \caption{}
\label{DHT22_Steckplatine}
\end{figure}
\ExerciseBox{
Lies Temperatur und Feuchte aus [Beispiele]}
\subsubsection{C}
\begin{console}
cd ~/Projekte
git clone https://github.com/mstroh76/Sensors-WiringPi.git
cd Sensors-WiringPi/DHT
g++ -o DHT *.cpp -lwiringPi
watch -n 2 ./DHT 22
cd ..
geany DHT.geany &
\end{console}
\subsubsection{C\#}
\begin{console}
cd ~/Projekte
git clone https://github.com/chirndler/wiringpi.net.sensors.git
cd wiringpi.net.sensors
xbuild /p:Configuration=Release wiringpi.net.sensors.sln
cd bin/Release/
sudo mono wiringpi.net.sensors.sample.exe 1
\end{console}
\subsubsection{Python}
% Projektverzeichnis?
\begin{console}
cd ~/Projekte
git clone https://github.com/jdupl/dhtxx-rpi-python3.git
sudo cp dhtxx-rpi-python3/dhtxx.py /usr/local/lib/python3.5/dist-packages/
\end{console}
\lstset{language=Python, caption=,
label=DHT22Program, frame=single, basicstyle=\ttfamily
\footnotesize, breakatwhitespace=false, showstringspaces=false,
showtabs=false, tabsize=2 }
\lstinputlisting{source/DHT22.py}
\begin{console}
python3 DHT22.py
\end{console}
\clearpage
\subsubsection{Blockly-gPIo}
\begin{figure}[ht]
%\centering
\includegraphics[scale=0.44]{images/Blockly-gPIo_DHT11_EN.png}
% \caption{}
\label{Blockly-gPIo_DHT11}
\end{figure}
\hspace{20mm}
\begin{figure}[ht]
%\centering
\includegraphics[scale=0.44]{images/Blockly-gPIo_DHT11_DE.png}
% \caption{}
\label{Blockly-gPIo_DHT11_DE}
\end{figure}