Cahier des charges
Les participants doivent trouver des indices composant un code permettant d'ouvrir une porte.
Réalisation - shopping list
Code source...
=> Démo
Cahier des charges
En réalisant une action sur un jeu d'échec, les participants obtiennent un code numérique.
Réalisation - shopping list
Work in progress...
=> Capteur à effet hall
Vidéo
Cahier des charges
Une télécommande trouvée dans la pièce doit permettre le déclenchement d'une vidéo.
Une seconde télécommande doit permettre à l'équipe BRAIN de réinitialiser ou arrêter le système.
Réalisation - shopping list
Gestion de l'infrarouge
Affichage
Config LIRC
begin
button = KEY_S
prog = brain
config = play
end
begin
button = KEY_REFRESH
prog = brain
config = reload
end
begin
button = KEY_POWER
prog = brain
config = stop
end
Code source Python
import lirc
import subprocess
import time
def initir():
sockid = lirc.init("brain", blocking = False)
def launch_epi():
epiph = subprocess.Popen(["epiphany", "file:///home/pi/logo.html"])
time.sleep(10)
subprocess.Popen(["xte", "key F11"])
def loadvideo():
subprocess.Popen(["xte", "key j"])
def reload():
subprocess.Popen(["xte", "key r"])
def shutdown():
subprocess.Popen(["sudo", "halt", "-p"])
initir()
launch_epi()
while True:
codeIR = lirc.nextcode()
if codeIR:
if codeIR[0] == "play":
loadvideo()
if codeIR[0] == "reload":
reload()
if codeIR[0] == "stop":
shutdown()
Code source Javascript
<script src="shortcut.js" type="text/javascript"></script>
<script type="text/javascript">
function init() {
shortcut.add("j", function() {
window.location.href = "file:///home/pi/video.html";
});
}
window.onload=init;
</script>
=> Démo
Work in progress