"""
Interface: galaxia
Nom du projet: Nouveau projet
Description: 
Toolbox: vittascience
Mode: codeOnly

Blocks: <xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="-qMN3J!2*jxwVhQ3M{}a">capt_optique</variable></variables><block type="on_start" id="oGd}/Ki;Wlh(8l?|Mxtf" x="20" y="20"></block><block type="forever" id="JMQnN!-Rn`#nI[mP/A8p" x="10" y="156"><statement name="DO"><block type="variables_set" id="o8Mrmle5xaUb{f_-ouIl"><field name="VAR" id="-qMN3J!2*jxwVhQ3M{}a">capt_optique</field><value name="VALUE"><block type="call_expression_return" id="?NzGwX*(lyvytH|w8l;X"><field name="NAME">p19</field><value name="chain"><block type="call_expression_editable_return" id="DEAYLM6v;J~L.=TLNi]u"><field name="NAME">value</field></block></value></block></value><next><block type="controls_if" id="_f/i:.t+k+l=iC|*O2,E"><value name="IF0"><block type="logic_compare" id="s9pYsk#kv*8;HY1zlF9j"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="M0^lW}{dPr$ldEdVXI.R"><field name="VAR" id="-qMN3J!2*jxwVhQ3M{}a">capt_optique</field></block></value><value name="B"><block type="math_number" id="%}r,*jHNpy3`7xx9[/R+"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="communication_serialWrite" id="H}z][VR[@n-HZ$oTo@j{"><mutation newlines="false"></mutation><value name="TEXT"><block type="text" id=";gB5wYwY[$vSwSVIf[|R"><field name="TEXT">Ours present</field></block></value><next><block type="io_pause" id="M?7C_d)4FkCL~n;1P/!5"><field name="UNIT">SEC</field><value name="TIME"><block type="math_number" id="hC4)/%DA#6@[9?HlD2.."><field name="NUM">1</field></block></value></block></next></block></statement></block></next></block></statement></block></xml>

Projet généré par Vittascience.
Ce fichier contient le code textuel ainsi que le code blocs. Il peut être importé de nouveau
sur l'interface http://vittascience.com/galaxia

"""

from machine import *
from thingz import *
import utime

p19 = Pin(13, Pin.IN)

while True:
  capt_optique = p19.value()
  if capt_optique == 1:
    print('Ours present')
    utime.sleep(1)
