Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lehrkraefte:blc:informatik:glf20:tasten [2020/12/07 10:42] Ivo Blöchliger |
lehrkraefte:blc:informatik:glf20:tasten [2020/12/10 08:30] (current) Ivo Blöchliger |
||
---|---|---|---|
Line 7: | Line 7: | ||
from ivobuttons import * | from ivobuttons import * | ||
- | ivobuttons.delay=0 | + | ivobuttons.delay=0 |
- | ivobuttons.repeat_delay=0 | + | ivobuttons.repeat_delay=0 |
while True: | while True: | ||
- | s = ivobuttons.states() | + | s = ivobuttons.states() |
- | display(str(s), | + | display(str(s), |
- | if s==24: | + | if s==24: |
break | break | ||
display(" | display(" | ||
</ | </ | ||
- | Beachten Sie, dass diese Programm nicht ohne Weiteres im Simulationsmodus läuft. Dazu müssen Sie erst noch die [[https:// | + | Beachten Sie, dass diese Programm nicht ohne Weiteres im Simulationsmodus läuft. Dazu müssen Sie erst noch die Datei {{ : |
+ | </ | ||
+ | |||
+ | <WRAP todo> | ||
+ | Testen Sie folgendes Programm auf der OxoCard (drücken Sie dazu beliebige Kombinationen der rechten Tasten): | ||
+ | <code python> | ||
+ | from oxocard import * | ||
+ | from ivobuttons import * | ||
+ | |||
+ | ivobuttons.delay=0 | ||
+ | ivobuttons.repeat_delay=0 | ||
+ | |||
+ | while True: | ||
+ | r,g,b = 0,0,0 | ||
+ | s = ivobuttons.states() | ||
+ | if s & IVO_R1: | ||
+ | r = 255 | ||
+ | if s & IVO_R2: | ||
+ | g = 255 | ||
+ | if s & IVO_R3: | ||
+ | b = 255 | ||
+ | # Schnell zeichnen | ||
+ | for x in range(2, | ||
+ | for y in range(2, | ||
+ | fastDot(x, | ||
+ | fastRepaint() | ||
+ | </ | ||
+ | * Was passiert genau beim " | ||
+ | * Setzen Sie die Variablen '' | ||
+ | * Schauen Sie sich das [[https:// | ||
+ | </ | ||
+ | |||
+ | <WRAP todo> | ||
+ | Fahren Sie weiter mit [[lehrkraefte: | ||
</ | </ |