Basic Information

This page allows you to fork a new project from an existing project (Layout manager examples). The newly forked project will be listed in the IoT Projects page as a new entry. If you want to overwrite the existing project, please edit it instead.

* Photo URLs that end with any one of .jpg, .jpeg, .png or that are uploaded to the Gyazo web service in the PNG format (e.g.https://gyazo.com/hogehoge) are supported.

* Node.js entry point main: index.js and dependencies to the npm module dependencies: { f3js: (略) } will be automatically added and thus do not need to be in this form.

Private Project

Unchecking this will make the project public and be listed in the IoT Projects page. The checkbox is unchecked by default since we want you to share the projects! Additionally, you cannot check this unless you are logged in. Once you make the project public, it cannot be undone. (Any edits to the project except for forking will also be public.)

Source Code

Provide the source code of a microcontroller or tiny computer in JavaScript. Node.js-based computers are supported. Require f3js package and use its API to design the device enclosure.

var f3js = require('f3js') , c = f3js.cc(); c.x = 20; c.y = 20; c.drawCircle(50, 50, 50); // 円を描く var circleGuide = c.drawCircle(50, 50, 30); // ガイドを描く circleGuide.layout = { name: 'distribute', valign: 'bottom' }; var Grove = require('jsupm_grove') , buttons = [] , numButtons = 1; // ボタン数 [1, 5] for (var i = 0; i < numButtons; i ++) { var button = new Grove.GroveButton(3 + i); c.add(button, circleGuide); // ボタンを配置する buttons.push(button); } setInterval(function () { // ボタンが押されたらコンソールにメッセージを出す for (var i = 0; i < numButtons; i ++) { if (buttons[i].value() > 0) console.log('button(' + i + ') pressed.'); } }, 100); // その他のコードは http://f3js.org/projects を見てみましょう! // APIドキュメントは http://f3js.org/docs にあります。
Customization

This content does not allow any customization.

Layout view options
Adding comments to variable declarations in the source code populate various GUI widgets in the "Customization" section depending on their types.

Design Alternatives

Modules

No modules are required for this project.

Layout
Program

Login first to use this feature.