Help us understand the problem. What is going on with this article?

TesselをMacにつないでLEDを点滅させるまで

More than 5 years have passed since last update.

参考(というかそのまんま): http://start.tessel.io/install

node.jsとnpmの資産にまるごと乗っかってるし、REPLもあるし、Wifi経由で簡単にインターネット接続デバイスになるし、これもしかしてめっちゃ良いものなのでは?

環境構築

  • node.jsをHomebrewでインストール
    • Macなのでbrew install node
  • Tessel開発ツールをnpmでインストール
    • npm install -g tessel
  • TesselとMacをUSBケーブルをつなぐ
    • PowerのLEDが緑色に点灯
  • Tesselのファームウェアをアップデート
    • tessel updateでしばらく色々表示され成功した模様。
$ tessel update
...
INFO Downloading remote file https://builds.tessel.io/firmware/tessel-firmware-current.bin
INFO Updating firmware... please wait. Tessel will reset itself after the update
INFO Complete  1365416 /1365416

$ tessel wifi -n [network name] -p [password]
TESSEL! Connected to TM-00-04-f0009a30-005e4f56-5cba6249.
INFO Connecting to "network name" with wpa2 security...
INFO Acquiring IP address. 
....
INFO Connected!

IP       192.168.2.111
DNS      8.8.8.8
DHCP     192.168.2.1
Gateway  192.168.2.1

npmプロジェクトから

  • 最初のtesselプロジェクトを作成
    • mkdir tessel-code && cd tessel-code && npm init
    • ってか普通のnode.jsプロジェクトですね
  • http://start.tessel.io/blinky からコピペしたblink.jsを走らせる
    • tessel run blink.jsするとサクッとLEDが点滅。簡単
$ tessel run blink.js 
TESSEL! Connected to TM-00-04-f0009a30-005e4f56-5cba6249.
INFO Bundling directory /Users/hogelog/repos/hogelog/js/tessel-code
INFO Deploying bundle (5.50 KB)...
INFO Running script...
I'm blinking! (Press CTRL + C to stop)
I'm blinking! (Press CTRL + C to stop)
...

npmモジュール追加したらそのまんま動くっぽいしめっちゃ便利そう。npm install -g tesselでインストールした開発ツール自体もnode.js、npmの仕組み上に乗っかったオープンソースなツールっぽい。
https://github.com/tessel/cli

REPLから

REPL(Read-Eval-Print-Loop、対話的実行環境)があった。めっちゃべんり。

$ tessel repl
TESSEL! Connected to TM-00-04-f0009a30-005e4f56-5cba6249.
INFO Bundling directory /usr/local/lib/node_modules/tessel/scripts/repl
INFO Deploying bundle (6.50 KB)...
INFO Running script...
> var tessel = require("tessel");
...
> tessel.led[0].toggle()
undefined
> tessel.led[0].toggle()
undefined

感想

良い。インターネットなアレコレと接続してもうちょっと色々遊んでみよう。

hogelog
hogelog http://hogel.org/
http://hogel.org/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした