Skip to content

Commit

Permalink
Merge pull request #45 from tessel/kb-wifi
Browse files Browse the repository at this point in the history
flow improvements
  • Loading branch information
Frijol committed Oct 13, 2015
2 parents 2326cde + 3789990 commit 94b9987
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 79 deletions.
8 changes: 4 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ <h1><a href="https://tessel.io/"><nobr><img src=
<a href="{{ site.baseurl }}/index.html">install</a>
</li>
<li>
<a href="{{ site.baseurl }}/blinky.html">blinky</a>
<a href="{{ site.baseurl }}/wifi.html">wifi</a>
</li>
<li>
<a href="{{ site.baseurl }}/wifi.html">wifi</a>
<a href="{{ site.baseurl }}/blinky.html">blinky</a>
</li>
<li>
<a href="{{ site.baseurl }}/modules.html">modules</a>
Expand All @@ -106,10 +106,10 @@ <h1><a href="https://tessel.io/"><nobr><img src=
<a href="{{ site.baseurl }}/index.html">1. install</a>
</li>
<li>
<a href="{{ site.baseurl }}/blinky.html">2. blinky</a>
<a href="{{ site.baseurl }}/wifi.html">2. wifi</a>
</li>
<li>
<a href="{{ site.baseurl }}/wifi.html">3. wifi</a>
<a href="{{ site.baseurl }}/blinky.html">3. blinky</a>
</li>
<li>
<a href="{{ site.baseurl }}/modules.html">4. modules<!--ul-->
Expand Down
42 changes: 37 additions & 5 deletions blinky.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ In your command line, make a folder for your Tessel code, then initialize a Tess

`t2 init`

Great! Now you're set up to run code on Tessel. Your "tessel-code" folder now contains a "package.json" with some metadata Node uses for your project, and a file called "index.js".

</div>
</div>

<hr>

<div class="row">
<div class="large-12 columns">

Great! Now you're set up to run code on Tessel. Your "tessel-code" folder now contains a "package.json" with some metadata Node uses for your project, and a file called "index.js".

"index.js" contains the code to make the blue and green LEDs blink. Let's take a look:

{% highlight javascript %}
Expand Down Expand Up @@ -56,9 +58,39 @@ to run your code in Tessel's RAM.

**Look at your Tessel!** The blue and green LEDs on your Tessel's LED panel should blink back and forth.

<hr>

**Bonus:** mess with the code to make the LEDs blink in sync.

**Extra bonus:** what if you want to save blinky to your Tessel? There's a command for that! Try `t2 push index.js`, then unplug your Tessel and plug it back in again. Wait for it to boot up, then... lights will blink! Tired of the blinking lights? `t2 erase` will clear the saved code. Learn more `t2` commands by running `t2 -h` or looking at the [T2 CLI docs](https://tessel.io/docs/cli).
**Extra bonus:** Want to untether your computer from your Tessel? Run:

`t2 push index.js`

Now plug Tessel in to USB power, just like plugging in a phone or an original Tessel.

<div class="row">
<div class="large-4 columns">

Wait for it to boot up, then... lights will blink!

Tired of the blinking lights? `t2 erase` will clear the saved code.

If you're connected over LAN, you can run any of these commands remotely, without plugging Tessel back into your computer.

Learn more `t2` commands by running `t2 -h` or looking at the [T2 CLI docs](https://tessel.io/docs/cli).

</div>
<div class="large-4 columns">

![](http://i.imgur.com/2JXAPKt.jpg)

</div>
<div class="large-4 columns">

![](http://i.imgur.com/kFHhIim.jpg)

</div>
</div>

</div>
</div>
Expand All @@ -67,10 +99,10 @@ to run your code in Tessel's RAM.

<div class="row">
<div class="large-6 columns left">
<a href="index.html" class="bottomButton button">Prev: Install</a>
<a href="wifi.html" class="bottomButton button">Prev: Wifi</a>
</div>

<div class="large-6 columns right">
<a href="wifi.html" class= "bottomButton right button">Next: Wifi</a>
<a href="modules.html" class= "bottomButton right button">Next: Add modules</a>
</div>
</div>
47 changes: 20 additions & 27 deletions install.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,48 +56,41 @@ After installing the Tessel drivers and Node.js, run this in cmd.exe:
</div>
</div>

### Update Tessel's Firmware
### A note on Tessel's bootup

Plug in your Tessel over USB (use Tessel's microUSB port, between the USB ports and the module ports).

**Note: you must wait for the Tessel to finish booting up (~30s) before you can run commands. Look for the tiny green LED on the Ethernet port to turn on to signal a full bootup.**
**You must wait for the Tessel to finish booting up (~30s) before you can run commands. Look for the tiny green LED on the Ethernet port to turn on to signal a full bootup.**

*This bootup issue is because Tessel 2 is still in development; track the issue [here](https://github.com/tessel/t2-cli/issues/346).*

Tessel's update process works best over Wifi, so let's get connected:
<hr>

<div class="row">
<div class="large-6 columns">

Enter in your command line

`t2 wifi -n <network-name> -p <password>`
### Find your Tessel

The yellow Wifi LED should start blinking within a few seconds.
Run:

You also need to authorize your computer to write to this Tessel:

`t2 provision`

</div>
<div class="large-6 columns">
`t2 list`

![](http://i.imgur.com/91pkDCQ.gif)
You should be able to see your Tessel connected:

</div>
</div>
{% highlight sh %}
INFO Searching for nearby Tessels...
Tessel-AF768F095 USB
{% endhighlight %}

<div class="row">
<div class="large-12 columns">
Yay, you found it! At this point, your Tessel is operational and in communication with your computer.

Great! now that we're connected and authorized, let's check for updates. Run:
**Bonus:** give your Tessel a name, like "Frank" or "Bulbasaur":

`t2 update`
`t2 rename <name>`

Tessel will check for new firmware versions, then download and apply them.
If you run `t2 list` again, you'll see your Tessel has changed its name:

</div>
</div>
{% highlight sh %}
INFO Searching for nearby Tessels...
Bulbasaur USB
{% endhighlight %}

</div>
</div>
Expand All @@ -110,6 +103,6 @@ Tessel will check for new firmware versions, then download and apply them.
</div>

<div class="large-6 columns right">
<a href="blinky.html" class= "bottomButton right button">Next: Blink lights</a>
<a href="wifi.html" class= "bottomButton right button">Next: Get connected</a>
</div>
</div>
71 changes: 28 additions & 43 deletions wifi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,30 @@

# Using Tessel's Wifi

Tessel has Wifi connectivity built into the board. You already used it in the Update step, but let's see what else we can do!
Tessel 2 has robust Wifi built into the board. Let's get connected!

*Note: This step is optional. If you don't have internet right now, just go ahead to the next step: [add modules](modules.html)*
</div></div>

<hr>

<div class="row">
<div class="large-12 columns">

### Connect

</div></div>

<div class="row">
<div class="large-6 columns">

**To connect to a new network,** enter in your command line (without brackets)
To connect to a new network, enter in your command line (without brackets)

`t2 wifi -n <network-name> -p <password>`

Tessel 2's Wifi LED blinks with every packet it receives.

Tessel saves network credentials and tries to reconnect automatically on startup.

</div>
<div class="large-6 columns">

Expand All @@ -31,21 +41,8 @@ Tessel 2's Wifi LED blinks with every packet it receives.

<div class="row">
<div class="large-12 columns">
Tessel saves network credentials and tries to reconnect automatically on startup.

To check whether you're connected, run

`t2 wifi -l`

This lists available wifi networks and will also show your connection status.

</div>
</div>

<hr>

<div class="row">
<div class="large-12 columns">
### Authorize

On Tessel 2, you can run and push your code over Wifi, not just USB. In fact, it's actually faster than over USB! Let's get that set up. Run:

Expand All @@ -57,55 +54,43 @@ Now, run:

`t2 list`

You should see a Tessel pop up with LAN connection, something like:
Assuming your computer is connected to the same network as your Tessel, you should see a Tessel pop up with LAN connection, something like:

{% highlight sh %}
INFO Searching for nearby Tessels...
Tessel-Bulbasaur LAN
Bulbasaur LAN
Bulbasaur USB
{% endhighlight %}

</div>
</div>

<div class="row">
<div class="large-4 columns">

Want to try it out? Power Tessel by plugging it into something other than your laptop.

You can use USB power just like a phone or a Tessel 1:
You might see (as in the example) that your Tessel is connected via both USB and LAN. The connection will automatically prefer LAN, since it's faster, but you can control this by adding `--lan` or `--usb` to any command.

Or specify `--lan` when you run code (`--usb` is the converse flag).
<hr>

</div>
<div class="large-4 columns">

![](http://i.imgur.com/2JXAPKt.jpg)

</div>
<div class="large-4 columns">

![](http://i.imgur.com/kFHhIim.jpg)

</div>
</div>
<div class="row">
<div class="large-12 columns">
Now navigate to wherever you saved your blinky code.

`t2 run blinky.js`
### Update

Great! now that we're connected and authorized, let's check for updates. Run:

`t2 update`

Tessel will check for new firmware versions, then download and apply them.

As usual. Now watch your Tessel blink from across the room!
</div>
</div>

<div class="greyBar"></div>

<div class="row">
<div class="large-6 columns left">
<a href="blinky.html" class="bottomButton button">Prev: Blinky</a>
<a href="index.html" class="bottomButton button">Prev: Install</a>
</div>

<div class="large-6 columns right">
<a href="modules.html" class= "bottomButton right button">Next: Add modules</a>
<a href="blinky.html" class= "bottomButton right button">Next: Blink lights</a>
</div>
</div>

0 comments on commit 94b9987

Please sign in to comment.