Skip to content

Instantly share code, notes, and snippets.

Olav Schettler oschettler

Block or report user

Report or block oschettler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oschettler
oschettler / heisserdraht.xml
Created Jul 13, 2019
Das Spiel "Der heisse Draht" mit Calliope Mini und NEPO
View heisserdraht.xml
<export xmlns="http://de.fhg.iais.roberta.blockly"><program><block_set xmlns="http://de.fhg.iais.roberta.blockly" robottype="calliope" xmlversion="2.0" description="" tags=""><instance x="-97" y="-82"><block type="robControls_start" id="je]FFh(n)aMFCVYI|o|g" intask="true" deletable="false"><mutation declare="true"></mutation><field name="DEBUG"></field><statement name="ST"><block type="robGlobalVariables_declare" id="(e+7exG3`J~=P9_^9vPL" intask="true" deletable="false" movable="false"><mutation next="true" declaration_type="Number"></mutation><field name="VAR">spielzeit</field><field name="TYPE">Number</field><value name="VALUE"><block type="math_number" id="]+kZ:.K*1/h95CoX*ydC" intask="true"><field name="NUM">0</field></block></value></block><block type="robGlobalVariables_declare" id="d_8qkANu.]1:FU66%Mi4" intask="true" deletable="false" movable="false"><mutation next="true" declaration_type="Number"></mutation><field name="VAR">beruehrt</field><field name="TYPE">Number</field><value name="VALUE"><block t
View quiz.py
# Quiz
fragen = [
{
"frage": "Wie hoch ist der Eifelturm",
"antwort": "300m",
},
{
"frage": "Wie viele EInwohner hat Luxemburg",
"antwort": "590000"
View adventure.py
erlaubte_richtungen = ["norden", "sueden", "osten", "westen"]
# jeweils Start, Ziel
norden = {0: None, 1: None, 2:0, 3:1}
sueden = {0:2, 1:3, 2:None, 3:None}
osten = {0:1, 1:None, 2:None, 3:None}
westen = {0:None, 1:0, 2:None, 3:None}
schluessel = {0:False, 1: False, 2: True, 3: False}
@oschettler
oschettler / primzahlen.py
Created Jun 4, 2019
Primzahlen nach dem Sieb des Eratosthenes für die vierte Klasse
View primzahlen.py
# Arbeitsheft 4
# Seite 86
primzahlen = [2]
zahlen = list(range(2, 101))
def streiche(vielfaches_von):
return [zahl
for zahl in zahlen
if zahl % vielfaches_von != 0]
@oschettler
oschettler / rateomatic.ino
Last active Apr 6, 2019
Rate-o-Matic with M5SICK-C and servo. Connect to address shown on display and vote. Home button for next vote
View rateomatic.ino
/**
* Survey - Display a survey result
*
* License: MIT
*
* Copyright (c) 2019 Olav Schettler
*
* Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der zugehörigen
* Dokumentationen (die "Software") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu nutzen,
* inklusive und ohne Ausnahme mit dem Recht, sie zu verwenden, zu kopieren, zu verändern,
@oschettler
oschettler / puck-avea.js
Last active Feb 9, 2019
Control an Elgato Avea Bulb with a Puck.JS
View puck-avea.js
/**
* Control an Elgato Avea Bulb:
*
* Single click - toggle on/off
* Double click - cycle through three brightness levels
*
* License: MIT
* (c) 2019 Olav Schettler <olav@schettler.net>
*/
var values = [
@oschettler
oschettler / linien.py
Last active Dec 31, 2018
Lines with PyGameZero
View linien.py
# Linien
# License: MIT
# Olav Schettler <olav@schettler.net>
WIDTH = 800
HEIGHT = 600
offset = 0
def incr_offset():
@oschettler
oschettler / circuit-lamp
Created Dec 31, 2018
Lampe - A Colorful Lamp with Adafruit Circuit Playground Express and an Infrared Remote Control
View circuit-lamp
# Lampe v0.1
# License MIT
# Olav Schettler <olav@schettler.net>
# These need drivers https://circuitpython.readthedocs.io/en/latest/docs/drivers.html
import pulseio
import board
import adafruit_irremote
from adafruit_circuitplayground.express import cpx
View Empty search result
if (
recipePositionWithinSearchResult <= this.attributes.searchResults.length
) {
recipeSearchItem = this.attributes.searchResults[
recipePositionWithinSearchResult - 1
].recipe;
this.attributes.recipeSearchItem = recipeSearchItem;
this.attributes.recipePosition = recipePositionWithinSearchResult - 1;
} else {
let message;
View keybase.md

Keybase proof

I hereby claim:

  • I am oschettler on github.
  • I am olav (https://keybase.io/olav) on keybase.
  • I have a public key ASDq7x2poSiNAbo2gLcs3NZDzIykbDf1LtJuASXpeO5Ahwo

To claim this, I am signing this object:

You can’t perform that action at this time.