Basic Information

This page allows you to fork a new project from an existing project (Run and jump). 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.

Card preview
Run and jump
'16/7/5 14:0
A simple game to avoid obstacles.

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 Buzzer = require("jsupm_buzzer"); var buzzer = new Buzzer.Buzzer(3); var grove =require("jsupm_grove"); var button = new grove.GroveButton(2); var led = new grove.GroveLed(4); var LCD = require("jsupm_i2clcd"); var lcd = new LCD.Jhd1313m1(6, 0x3E, 0x62); var f3js = require('f3js') , c = f3js.createContainer() , x = 10 , y = 10 , width = 100 , height = 105 , thickness = 42 , jw = 7 /* かみ合わせ幅 [5, 10] */ , jh = 2 /* 板厚[mm] [1, 5] */; c.x = x; c.y = y; // 表の面を作る var p = c.jrc(0, 0, width, height, jw, jh); /* // 上記は次のコードと同じ //var p = c.drawJointRectangle(0, 0, width, height, jw, jh); // または次のコードと同じ var p = c.createPath(); p.moveTo(0, 0); p.jointTo(width, 0, jw, jh); p.jointTo(width, height, jw, jh); p.jointTo(0, height, jw, jh); p.jointTo(0, 0, jw, jh); p.close(); */ // 表面にいろいろ配置する c.add(buzzer, { x: 50, y: 80}); c.add(lcd, { x: 50 + 0, y: 30 + 0 }); c.add(led, 20, 80); c.add(button, { x: 80 + 0, y: 80 + 0 }); // 配線用の穴を開ける c.drawRectangle(15, 59, 10, 6); c.drawRectangle(45, 59, 10, 6); c.drawRectangle(75, 59, 10, 6); // 側面と裏面を作る var ps = p.extrude(45); ps[0].x = width + 5; ps[0].y = jh; ps[1].x = width + 5; ps[1].y = (thickness + 5) * 2 + jh; ps[2].x = width + 5; ps[2].y = thickness + 5 + jh; ps[3].x = width + 5; ps[3].y = (thickness + 5) * 3 + jh; ps[4].x = 0; // 最後の要素が裏面 ps[4].y = height + 5; // 表の面の真下に配置する for (var i = 0; i < ps.length; i ++) { c.add(ps[i]); } // 側面の一つに電源用の穴を開ける ps[1].drawRectangle(jh + 5, thickness - jh - 5, height - jh*2 - 10, -10);
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.