Esempio n. 1
0
    "Welcome to Explorer HAT {name}...",
    """In this tutorial we'll introduce you to Digital Inputs.

Digital inputs take a high (5V) or low (0V) voltage
and turn it into a value you can use in your code.
""",
    lambda: tutorial.wait_for_space(),
    """Before starting, we must "import" Explorer HAT.

Remember to type:

    import explorerhat

Go for it:
""",
    lambda: tutorial.wait_for_input("import explorerhat"),
    lambda: tutorial.importme(),
    """Great! Your Explorer HAT looks like it's plugged in
and ready to go. Let's start reading some digital values.

The easiest way to input a digital value is with a male to
male jump wire. Make sure you've got one handy!
""",
    lambda: tutorial.wait_for_space(),
    """Now to read a digital value you'll need to use:

    explorerhat.input.one.read()

Try it:
""",
    lambda: tutorial.wait_for_input("explorerhat.input.one.read()"),
Esempio n. 2
0
    "Welcome to Explorer HAT {name}...",
    """In this introduction, we'll show you the basics.

You'll learn how to turn a light on and off,
and how to use a fancy pulse effect too!
""", lambda: tutorial.wait_for_space(),
    """Before starting, we must "import" Explorer HAT.

This loads the Python code, called a module, needed
to make Explorer HAT work.

To do this, type:

    import explorerhat

Try it now:""", lambda: tutorial.wait_for_input("import explorerhat"),
    lambda: tutorial.importme(),
    """You can do this when you run "python" on the command
line, and also in IDLE.

Now, let's learn a little about Explorer HAT. It has:

* 4 inputs, which accept up to 5 volts
* 4 outputs, which sink up to 5 volts to ground
* 4 LEDs; Yellow, Red, Blue and Green
* 8 touch inputs, 4 are fruit compatible

If you have an Explorer HAT Pro, you'll also find:

* 2 Motor outputs, for making robots!
* 4 Analog Inputs for reading sensors, sliders and stuff
Esempio n. 3
0
You'll learn how to turn a light on and off,
and how to use a fancy pulse effect too!
""",
    lambda: tutorial.wait_for_space(),
    """Before starting, we must "import" Explorer HAT.

This loads the Python code, called a module, needed
to make Explorer HAT work.

To do this, type:

    import explorerhat

Try it now:""",
    lambda: tutorial.wait_for_input("import explorerhat"),
    lambda: tutorial.importme(),
    """You can do this when you run "python" on the command
line, and also in IDLE.

Now, let's learn a little about Explorer HAT. It has:

* 4 inputs, which accept up to 5 volts
* 4 outputs, which sink up to 5 volts to ground
* 4 LEDs; Yellow, Red, Blue and Green
* 8 touch inputs, 4 are fruit compatible

If you have an Explorer HAT Pro, you'll also find:

* 2 Motor outputs, for making robots!
* 4 Analog Inputs for reading sensors, sliders and stuff