From fd580bf13a6e791af261ff83785df7af73a6023f Mon Sep 17 00:00:00 2001 From: agp8x Date: Thu, 3 Aug 2017 15:37:25 +0200 Subject: [PATCH] =?UTF-8?q?w=C3=B6rk=20on=20windows=20and=20REPL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- presentation.tex | 57 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/presentation.tex b/presentation.tex index e8cdace..1ea021e 100644 --- a/presentation.tex +++ b/presentation.tex @@ -122,25 +122,37 @@ Cooler: \href{https://micropython.org/}{MicroPython} \section{Setup} \subsection{Tools} -\begin{frame}{Tools} +\begin{frame}{Tools}\framesubtitle{Alle Downloads unter \url{https://iot.fswiai.de/}} %TODO Linux \begin{itemize} - \item Debian, Gentoo (testing), Arch: esptool picocom + \item Debian, Gentoo (testing): \texttt{\{apt install,emerge\} esptool picocom} \item \texttt{adduser \$USER dialout} \end{itemize} Windows \begin{itemize} - \item well, your on your own now... - \item \url{https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe} + \item \url{https://www.python.org}, z.B. 3.6.2 %TODO: WIAI-link + \begin{itemize} + \item Option \textit{Add Python to PATH} aktivieren + \end{itemize} \item \texttt{pip install esptool} - \item \url{https://www.chiark.greenend.org.uk/~sgtatham/putty/download.html} + \item \url{https://www.chiark.greenend.org.uk/~sgtatham/putty/download.html} %TODO: WIAI-link + \item CH340G Treiber: \url{http://www.wch.cn/download/CH341SER\_ZIP.html} %TODO: WIAI-link +\end{itemize} +Mac +\begin{itemize} + \item Irgendwie so ähnlich\dots \end{itemize} \end{frame} \subsection{Firmware} -\begin{frame}{Firmware} +\begin{frame}{Firmware}\framesubtitle{Alle Downloads unter \url{https://iot.fswiai.de/}} %TODO +Windows-Spezial: \begin{itemize} - \item \url{https://micropython.org/download\#esp8266} + \item Portbezeichner: Gerätemanager $\rightarrow$ Serielle Geräte (COM+LPT) $\rightarrow$ COM$X$ +\end{itemize} +Flashen: +\begin{itemize} + \item \url{https://micropython.org/download\#esp8266} %TODO: WIAI-link \item \texttt{esptool.py --port /dev/ttyUSB0 erase\_flash} \item \texttt{esptool.py --port /dev/ttyUSB0 --baud 460800 write\_flash --flash\_size=detect 0 esp8266-20170108-v1.8.7.bin} \item reset @@ -149,12 +161,37 @@ Windows \subsection{REPL} \begin{frame}{REPL} - +*nixe: +\begin{itemize} + \item \texttt{picocom -b 115200 /dev/ttyUSB0} + \item $n$ beherzte \textit{}-Drücke +\end{itemize} +Windows: +\begin{itemize} + \item puTTY + \item Serielle Verbindung + \item 115200 Baud + \item $n$ beherzte \textit{}-Drücke +\end{itemize} +%TODO: bild mit REPL (inkl ENTERs) \end{frame} -\subsection{Wlan} -\begin{frame}{Wlan}\framesubtitle{Put the I in IoT} +\lstset{language=Python,captionpos=b} +\subsection{Wlan} +\begin{frame}[fragile]{Wlan}\framesubtitle{Put the I in IoT} +\begin{lstlisting}[caption={Descriptive Caption Text},label=DescriptiveLabel] +import network +sta_if = network.WLAN(network.STA_IF) +ap_if = network.WLAN(network.AP_IF) + +ap_if.active(False) +sta_if.active(True) + +sta_if.connect('SSID', 'SECRET') # TODO: setup +sta_if.isconnected() +sta_if.ifconfig() +\end{lstlisting} \end{frame} \subsection{Init}