Added short workshop for indayTeachers 05/2017

parent c57c9119
% !TEX encoding=latin1
\documentclass{beamer}
\usepackage{IISen}
\usepackage{sidecap}
\mode<presentation>
\title{A quick glance at BBC Micro:bit}
\author{Simon Haller}
\date{16.03.2017, Innsbruck}
\begin{document}
\frame[plain]{\titlepage}
%\frame{\tableofcontents}
\section{BBC Micro:bit and Calliope Mini}
\frame{\frametitle{Technical Specifications}
\vspace*{-2cm}
\begin{figure}
\flushright\includegraphics[width=4cm,right]{grafics/microbit.png}
\end{figure}
\vspace*{-0.57cm}
\begin{block}{micro:bit (02/2016)}
\begin{itemize}
\item Processor: Nordic \href{https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822}{NRF51822} (ARM Cortex M0 32bit, 16KB RAM, 256KB Flash-Memory)
\item Sensors: NXP/Freescale MMA8652, MAG3110 (Accelerometer and Magnetometer), Temperature (CPU), Brightness (Light intensity using LED)
\item Other: LED Array (5x5), 2 Buttons, IO: three ring connectors, 23-pin edge-connector (up to 3) PWM outputs, 6 to 17 GPIO pins, 6 Analog Inputs, Serial, SPI, and $I^2C$
\item CCA 4.0 Hardware and Open Source Software (MIT License)
\end{itemize}
\end{block}
}
\frame{\frametitle{Software}
\begin{itemize}
\item \href{https://github.com/lancaster-university/microbit-dal}{Core Drivers (MIT License)}{can be used for C/C++ development}
\item \href{http://microbit.org/code/}{CodeKingdoms}, using JavaScript
\item \href{http://microbit.org/code/}{Microsoft Block Editor}, based on Blockly
\item \href{http://microbit.org/code/}{Microsoft TouchDevelop}
\item \href{http://python.microbit.org/editor.html}{MicroPython}, \href{http://microbit-micropython.readthedocs.io/en/latest/tutorials/introduction.html}{Reference}
\end{itemize}
}
\frame{\frametitle{Technical Specifications}
\vspace*{-2cm}
\begin{figure}
\flushright\includegraphics[width=5cm,right]{grafics/calliope.png}
\end{figure}
\vspace*{-0.5cm}
\begin{block}{Calliope mini (est.~04/2017)}
\begin{itemize}
\item Processor: Nordic \href{https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822}{NRF51822} (ARM Cortex M0 32bit, 16KB RAM, 256KB Flash-Memory)
\item Sensor: IMU (\href{www.mouser.com/ds/2/621/BST-BMX055-DS000-01v2-371988.pdf}{BMX055}), Temperature (CPU), Brightness (Light intensity using LED)
\item Sound: Mic, Speaker
\item Motor Driver: \href{http://www.ti.com/lit/ds/symlink/drv8837.pdf}{DRV8837}
\item Other: Bluetooth, $I^2C$, UART, SPI, 26xGPIO, 2 Buttons, LED Array (5x5)
\end{itemize}
\end{block}
}
\begin{frame}[fragile]
\frametitle{Let's Code I}
\begin{block}{Hello World (block programming)}
\includegraphics[width=6cm]{grafics/hello_world.png}
\end{block}
\begin{block}{Hello World (python programming)}
\begin{verbatim}
# micro python hello world:
from microbit import *
while True:
display.scroll('Hello World!')
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[fragile]
\frametitle{Let's Code II (Stochastic)}
\begin{block}{Dice}
\begin{figure}
\flushright\includegraphics[width=6cm]{grafics/dice.png}\\
\end{figure}
\vspace*{-2cm}
\textbf{in python:}
\begin{verbatim}
from microbit import *
from random import *
while True:
if button_a.is_pressed():
display.show(str(randint(1,6))
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[fragile]
\frametitle{Let's Code II (Stochastic)}
\begin{block}{Fancy Dice}
\includegraphics[width=9cm,center]{grafics/fancy_dice.png}
\end{block}
\begin{block}{Questions}
Howto modify the dice to my favor?\\
\end{block}
\end{frame}
\begin{frame}[fragile]
\begin{block}{Let's Code II (Number Guessing)}
\vspace*{-0.4cm}
\begin{scriptsize}
\begin{verbatim}
from microbit import *
from random import *
NUMBER=randint(0,9)
GUESSED=0
gameOn=True
display.scroll("Number?",1000)
while gameOn:
display.show(str(GUESSED))
if button_a.is_pressed() and GUESSED > 0 :
GUESSED=GUESSED-1
if button_b.is_pressed() and GUESSED < 10 :
GUESSED=GUESSED+1
if button_a.is_pressed() and button_b.is_pressed():
if GUESSED==NUMBER:
display.show(Image.HAPPY,1000)
sleep(2000)
gameOn=False
else:
display.show(Image.SAD,1000)
sleep(1000)
\end{verbatim}
\end{scriptsize}
\end{block}
\end{frame}
\include{rock_paper_scissor}
\begin{frame}[fragile]
\frametitle{Let's Code IV (Using radio)}
\begin{block}{Micro:bit to Micro:bit}
\begin{scriptsize}
\begin{verbatim}
from microbit import *
import radio
# The radio won't work unless turned on.
radio.on()
while True:
# Button A send message.
if button_a.was_pressed():
radio.send('HEART')
display.clear()
# Read any incoming messages.
incoming = radio.receive()
# If there's an incoming message 'HEART' display it
if incoming == 'HEART':
display.show(Image.HEART, delay=100, wait=False)
\end{verbatim}
\end{scriptsize}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Let's Code V }
\begin{block}{Analog Pins}
\includegraphics[width=9cm]{grafics/analog_pin0.png}\\
\end{block}
\begin{block}{Light Intensity Graph}
\includegraphics[width=9cm]{grafics/light-level.png}\\
\end{block}
\end{frame}
\begin{frame}
\frametitle{Let's Code V (Music)}
\hspace*{2cm}\includegraphics[width=7cm]{grafics/banana-keyboard.png}\\
\medskip
\includegraphics[width=9cm]{grafics/banana-code.png}\\
\end{frame}
\begin{frame}
\frametitle{Ideas}
\begin{itemize}
\item Wrist-Watch, Compass and Temperature
\item Don't spill the tray
\item Learning to Drum (repeat pattern by clapping)
\item Building a \href{https://pxt.microbit.org/projects/guitar}{Guitar}
\item Extend the Pong Game to two player via Radio
\item \href{http://blog.withcode.uk/2016/12/microbit-tetris-in-python/}{Tetris}
\item \href{http://www.stuffaboutcode.com/2015/11/snake-on-microbit-using-micropython.html}{Snake}
\item Simple Weather Station
\item Mini-Robot
\item Using Bluetooth
\end{itemize}
\end{frame}
\include{bib}
\end{document}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment