Basic Information

This page allows you to edit the existing project (Layout manager examples). The edited project will replace the existing entry in the IoT Projects page. If you want to add a new entry based on the project, please fork from 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

This project is already public and cannot be made private.

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 = 3; // ボタン数 [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.