rmeove iot.wiai links, unify language, bump version

master
clemens 2017-11-24 20:07:22 +01:00
parent dcbf8d6b8c
commit 07d5c67afb
4 changed files with 31 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View File

@ -137,19 +137,20 @@ Cooler: \href{https://micropython.org/}{MicroPython}
\item Frei \& Open Source \item Frei \& Open Source
\item Einige Funktionalität eingeschränkt (z.B. Multithreading) \item Einige Funktionalität eingeschränkt (z.B. Multithreading)
\item Verscheidene Boards/Controller unterstützt: PyBoard, ESP32, \dots \item Verscheidene Boards/Controller unterstützt: PyBoard, ESP32, \dots
\item Doku: \url{http://docs.micropython.org/en/latest/esp8266/index.html} (\url{http://iot.wiai/doc}) \item Doku: \url{http://docs.micropython.org/en/latest/esp8266/index.html}
\end{itemize} \end{itemize}
Lowlevel: C, Arduino Studio Lowlevel: C, Arduino Studio
\end{frame} \end{frame}
\section{Setup} \section{Setup}
\subsection{Tools} \subsection{Tools}
\begin{frame}{Tools}\framesubtitle{Alle Downloads unter \url{http://iot.wiai/}} \begin{frame}{Tools}
Linux Linux
\begin{itemize} \begin{itemize}
\item Debian, Gentoo (testing): \texttt{\{apt install,emerge\} esptool picocom} \item Debian, Gentoo (testing): \texttt{\{apt install,emerge\} esptool picocom}
\item \texttt{adduser \$USER dialout} \item \texttt{adduser \$USER dialout}
\item Alternative: Docker (bin/docker): \textit{docker-compose run esp esptool} \item neuer Login (sudo su \$USER)
%\item Alternative: Docker (bin/docker): \textit{docker-compose run esp esptool}
\end{itemize} \end{itemize}
Windows Windows
\begin{itemize} \begin{itemize}
@ -163,25 +164,24 @@ Windows
\end{itemize} \end{itemize}
Mac Mac
\begin{itemize} \begin{itemize}
\item Homebrew (\url{https://brew.sh}) installieren + \texttt{brew install python3 \&\& pip install esptool} \item Homebrew (\url{https://brew.sh}) installieren
\item \texttt{brew install python3 \&\& pip install esptool}
\end{itemize} \end{itemize}
Offline pip: \textit{pip install -f http://iot.wiai/webrepl/}%TODO: --no-index?
\end{frame} \end{frame}
\subsection{Firmware} \subsection{Firmware}
\begin{frame}{Firmware}\framesubtitle{Alle Downloads unter \url{http://iot.wiai/}} \begin{frame}{Firmware}
Windows-Spezial: Windows-Spezial:
\begin{itemize} \begin{itemize}
\item Portbezeichner: Gerätemanager $\rightarrow$ Serielle Geräte (COM+LPT) $\rightarrow$ COM$X$ \item Portbezeichner: Gerätemanager $\rightarrow$ Serielle Geräte (COM+LPT) $\rightarrow$ COM$X$ (z.B. COM12)
\item python -m esptool
\end{itemize} \end{itemize}
Flashen: Flashen:
\begin{itemize} \begin{itemize}
\item \url{https://micropython.org/download\#esp8266} %TODO: WIAI-link \item MicroPython Download: \url{https://micropython.org/download\#esp8266} (esp8266-20171101-v1.9.3)
\item[*nix] \texttt{esptool.py --port /dev/ttyUSB0 erase\_flash} \item[*nix] \texttt{esptool.py --port /dev/ttyUSB0 erase\_flash}
\item[win] \texttt{python -m esptool --port COM12 erase\_flash} \item[win] \texttt{python -m esptool --port COM12 erase\_flash}
\item[*nix] \texttt{esptool.py --port /dev/ttyUSB0 --baud 460800 write\_flash --flash\_size=detect 0 esp8266-20170823-v1.9.2.bin} \item[*nix] \texttt{esptool.py --port /dev/ttyUSB0 --baud 460800 write\_flash --flash\_size=detect 0 esp8266-20171101-v1.9.3.bin}
\item[win] \texttt{python -m esptool --port COM12 --baud 460800 write\_flash --flash\_size=detect 0 esp8266-20170823-v1.9.2.bin} \item[win] \texttt{python -m esptool --port COM12 --baud 460800 write\_flash --flash\_size=detect 0 esp8266-20171101-v1.9.3.bin}
\item reset \item reset
\end{itemize} \end{itemize}
\end{frame} \end{frame}
@ -192,8 +192,9 @@ Flashen:
\begin{itemize} \begin{itemize}
\item \texttt{picocom -b 115200 /dev/ttyUSB0} \item \texttt{picocom -b 115200 /dev/ttyUSB0}
\item $n$ beherzte \textit{<ENTER>}-Drücke \item $n$ beherzte \textit{<ENTER>}-Drücke
\item Docker: \texttt{docker-compose run esp} (evtl. TTY anpassen) %\item Docker: \texttt{docker-compose run esp} (evtl. TTY anpassen)
\item[exit] Ctrl-a Ctrl-x \item[exit] Ctrl-a Ctrl-x
\item Alternativ: screen, \dots
\end{itemize} \end{itemize}
Windows: Windows:
\begin{itemize} \begin{itemize}
@ -222,7 +223,7 @@ ap_if = network.WLAN(network.AP_IF)
ap_if.active(False) ap_if.active(False)
sta_if.active(True) sta_if.active(True)
sta_if.connect('SSID', 'SECRET') # TODO: setup sta_if.connect('wiaiot', 'toiaiw')
sta_if.isconnected() sta_if.isconnected()
sta_if.ifconfig() sta_if.ifconfig()
\end{lstlisting} \end{lstlisting}
@ -234,18 +235,20 @@ import webrepl_setup
\end{lstlisting} \end{lstlisting}
\begin{itemize} \begin{itemize}
\item \textit{import webrepl\_setup} \item \textit{import webrepl\_setup}
\item reset/start webrepl (\textit{import webrepl \& webrepl.start()}) \item WebREPL einrichten (\textit{import webrepl \& webrepl.start()})
\item visit \url{http://iot.wiai/webrepl/} or \url{http://micropython.org/webrepl/} \item WebREPL Client \url{http://micropython.org/webrepl/}
\item enter your ESP's IP (\textit{sta\_if.ifconfig()}) \& connect \item IP des ESP's für WebSocket verwenden (\textit{sta\_if.ifconfig()})
\item Datei Up-/Download (z.B. für main.py)
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\subsection{Init} \subsection{Init}
\begin{frame}[fragile]{main.py} \begin{frame}[fragile]{main.py}
Wird beim starten ... gestartet Wird beim starten \dots gestartet
\begin{lstlisting}[caption={main.py},label=mainpy] \begin{lstlisting}[caption={main.py},label=mainpy]
def connect_wifi(ssid, passphrase): from secrets import SSID, PASS
def connect_wifi(ssid=SSID, passphrase=PASS):
#TODO ;) #TODO ;)
pass pass
@ -351,14 +354,22 @@ d.humidity()
\end{frame} \end{frame}
\subsection{Interrupts} \subsection{Interrupts}
\begin{frame}{Here be dragons} \begin{frame}{Interrupts}
\framesubtitle{Here be dragons}
\begin{itemize} \begin{itemize}
\item Z.B. Callbacks von Tastern \item Z.B. Callbacks von Tastern
\item pausieren main \item pausieren main
\item dürfen keinen Speicher allozieren \item dürfen keinen Speicher allozieren
\begin{itemize}
\item[\checkmark] \textit{alarm = True \#only with previously allocated variable!}
\item[\checkmark] \textit{counter = counter + 1}
\item[\checkmark] \textit{interrupts[2] += 1}
\item[X] \textit{events.append(Interrupt())}
\item[X] \textit{}
\end{itemize}
\item Emergency exception buffer: \textit{micropython.alloc\_emergency\_exception\_buf(100)} \item Emergency exception buffer: \textit{micropython.alloc\_emergency\_exception\_buf(100)}
\end{itemize} \end{itemize}
\cite{mp-interrupt} Siehe Doku :) \cite{mp-interrupt}
\end{frame} \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%