create every day - 福野泰介の一日一創

Let's Be Smart Home Creator! Cat IoT with WiFi module "MixJuice" for IchigoJam

2017/04/10 23:55:00
#ichigojam #IoT #maker #neko #english 

If you have own WiFi in the home, using WiFi is one of easy way to create own IoT device. Cheking cat's toilet is first step to look a cat's health! Today I updated its communication device to WiFi.


NekoIoT notices me that a cat go to a toilet.


It's a 450 yen distance sensor same as paprika's eye!
* シャープ測距モジュール GP2Y0A21YK: センサ一般 秋月電子通商 電子部品 ネット通販


MixJuice is the WiFi module for IchigoJam.
Just stack your IchigoJam and set up.

?"MJ APC *ssid* *password* MJ APC *ssid* *password* '................. 'WiFi connected: ***.***.***.*** 'OK

It succeeded to connect the net! And program as below.

1 'NekoIoT ver 1.3 10 W=60*20:D=0:L=200:LED1:?"Connecting..." 15 UART0,0:WAIT W:LED0:?"OK":UART1,1 20 GSB@GET:?A:IF A<=L WAIT10:CONT 32 LED1 36 ?"SEND!":GSB@SEND 40 WAIT 60*10 45 LED0 50 GOTO 20 200 @GET:M=0:S=0:FOR I=0 TO 4:A=ANA(2):S=S+A:IF A>M M=A 210 WAIT5:NEXT 220 A=(S-M)/4:RTN 300 @SEND:?"MJ GET ***.***/***/?v=";A:RTN

* set a URL of your web app! I set up to notice my phone via IFTTT.

Sakura's IoT Platform is easy way to create IoT also and the easiest way to set up! Just be power it on!
"How to blink a LED via web on IchigoJam using Sakura IoT Platform beta"
This is a tutorial to use it.

In 27 April at Tokyo, we will hold an IoT event!
"Ideathon with the first step of IoT and Open Data / IoTとオープンデータはじめのいっぽ&課題解決型アイデアソン"

Enjoy IoT Hackathon Kit using Sakura's IoT Platform x IchigoJam

2017/04/03 23:55:00
#IchigoJam #IoT #english 

IchigoJam is one of primary partners of Sakura's IoT Platform (さくらのIoT Platform@ja → sakura.io). We lend 20 Sakura's IoT Platform sets for Hackathon! Yessterday for kids, today for adults!


I prepared 20 Sakura's IoT Platform sets with voltage chaenger for I2C. (see how to make)


Show how to use the bright sensor ad the breadboard.


Connecting the sensor and Sakura's IoT Platform to IchigoJam.


You can get the data and send the data with net on the screen or your smartphone.

I prepared an easy library to use Sakura's IoT Platform.

W=15:GSB@WOUT

Just type this to send a value

GSB@WIN:?W

Just type this to receive a value

10 GSB@WIN:IF W BEEP W,60 20 WAIT 10:GOTO 10

This is the easy pager (ポケベル@ja)!
If IchigoJam get the number just beep a sound.

Write a latest firmware and this program to IchigoJam before hackathon.

699 END:'IoT lib 700 @PWR:POKE#700,2,0:N=3:GSB@I2C:?PEEK(#782):RTN 710 @ACT:POKE#700,1,0:N=3:GSB@I2C:N=PEEK(#782):RTN 720 @GET:POKE#700,#30,0:N=#14:GSB@I2C:N=PEEK(#784):RTN 730 @CHK:POKE#700,#32,0:N=4:GSB@I2C:N=PEEK(#783):RTN 800 @WOUT:POKE#700,#20,10,1,76,W,W>>8,0,0,0,0,0,0:N=2:GSB@I2C:POKE#700,#24,0:N=2:GSB@I2C:RTN 810 @WIN:W=0:GSB@CHK:IF!NRTNELSEGSB@GET:W=PEEK(#784)|PEEK(#785)<<8:RTN 910 @I2C:M=PEEK(#701)+2 920 C=0:FOR I=0 TO M-1:C=C^PEEK(#700+I):NEXT:POKE#700+M,C 930 IFI2CR(79,#700,M+1,#780,N+1)'STOP 940 C=0:FORI=0TON-1:M=PEEK(#780+I):C=C^M:NEXT 950 IFC!=PEEK(#780+N)ORPEEK(#780)!=1'STOP 960 RTN

Let's hack with IoT!

IchigoJam Zero the World's Lightest PC 0g 150yen for IchigoJam Things!

2017/04/01 00:00:00
#IchigoJam #IoT #maker #english 

重さ0g、150円の世界最軽量、最安値のパソコン「IchigoJam Zero」と「IchigoJam Things」をリリース!
I released the world's lightest 0g/150yen PC "IchigoJam Zero" and "IchigoJam Things"!

Finger Size! 指の上サイズ! (photo human ver.)


Weight: 0g (IchigoJam Zero) / 9g (Raspberry Pi Zero)


IchigoJam ZeroRaspberry Pi Zero
CPUNXP LPC1114 @ 48MHzARM1176JZF-S @ 1GHz
RAM4KB512MB
UART115,200bps (default)115,200bps (default)
I2Cx1x2
GPIOx11x22
Video outputNTSC composit
(needs 2 registers 470/100)
HDMI / NTSC composit
(needs 2 wires)
KeyboardPS/2 keyboard
(needs 2 wires)
USB keyboard
Storageinternal Flashneeds a SD card
OSIchigoJam BASIC
IchigoLatte JavaScript
(needs download & install)
Raspbian etc...
(needs download & install)
Price$1.5$5
Weight0g9g
Size11.8mm x 7.2mm67.6mm × 30mm
Power Consumption0.05W0.5W-0.7W


IchigoJam Things is a break out board for IchigoJam Zero!


Now available on Upverter! "IchigoJam Things / RPi by taisukef f9de7f39761699b0 - Upverter"
IchigoJam Zero を使うブレイクアウトボード「IchigoJam Things」のガーバーデータがダウンロード可能です!


IchigoJam Zero on IchigoDake & IchigoIgai by PCN


IchigoDake makes IchigoJam everywhere!


Enjoy making everythings! ものづくりをたのしもう!

links
- 「若年層に対するプログラミング教育の普及推進」事業にIchigoJam採用!
- 2017.4.1 IchigoDake / IchigoIgai | PCN プログラミング クラブ ネットワーク
- 2016.4.1 MSXになりたい「こどもパソコンIchigoJam」あの起動ロゴを搭載!(boot logo)
- 2015.4.1 創る人を創ろう! Pepper より安価な こどもロボットPaprika 発表!(Kids Robot paprika)
- 2014.4.1 目指すはMSX! Raspberry Pi より安価な IchigoJam 発表!(Kids PC IchigoJam)
- 2013.4.1 jig megane-0 かけられる大容量バッテリー(glasses)

Deploy to the Bus, "Bus Passengers Realtime Opendata System" will start at Sabae!

2017/03/30 23:55:00
#IchigoJam #IoT #maker #english 

Sabae city was worried about taking times to make the report of count of passengers everyday. "Sakura's IoT Platform(さくらのIoT Platform@ja → sakura.io)" the lowest 4G network device and IchigoJam will solve it!


Mr. Makita CIO of Sabae city built devices.


Find the place to deploy it!


Connect the power cable from the cigar socket of the bus to this system!


Tada! It's works!


The zero days (day 10, 20 and 30) are free for elderly people (over 75).
Let's promote with Sabae city!


Looking forward to launch in this April 1!

- Features
Pysical Buttons are easier than touch interfaces and hand writings.
IchigoJam is stronger than other PCs cause no external strages (SD/SSD/HDD).
IchigoJam boots quicker than other PCs, just a second.
IchigoJam is safer than other PCs cause OS is very thin IchigoJam BASIC OS.
Sakura's IoT Platform is safer than other systems cause this is protected by the device and the safe connection.

links
- 鯖江市のバス乗客リアルタイムオープンデータシステムを支える「IchigoJam」 - IchigoJamとさくらのIoT Platform | マイナビニュース
- Sakura's IoT Platform(さくらのIoT Platform@ja → sakura.io) (IchigoJam is one of the priority partners)

How to connect Physical Push Buttons to IchigoJam and web

2017/03/29 23:55:00
#IchigoJam #IoT #maker #english 

The physical push button is easy to user for everyone!
Let's connect and use on your IchigoJam.

It's very easy that you can connect 1 push button via 2 wires (GND-IN1).

FORI=0TO100:?IN(1):NEXT

IN1,IN2,IN4 of IchigoJam are pull-uped port, so you can directly connect the wire.
IN3 and OUT1-6 are not pull-uped, so you have to pull-up using about the 10kΩ register each.

This system is for the Sabae Bus.

In this April, bus drivers will manipulate this!
"Bus Realtime OPENDATA System Project with Corprate Fellowship (Code for Japan) at Sabae"

10 FOR I=1 TO 5:OUT I,-1:NEXT 20 C=IN()&`11111011:A=~C&B:B=C 40 ?A 50 GOTO 20

This code is to get timings of pressing.

Let's connect physical to web!

links
- 福井県鯖江市、jig.jp、さくらインターネットが共同開発した「バス乗客リアルタイムオープンデータシステム」を鯖江市の公共バスで運用開始

How to blink a LED via web on IchigoJam using Sakura IoT Platform beta

2017/03/14 23:55:00
#IchigoJam #IoT #maker #english 

Let's make WoT!
The first step of Web of Things is also blinking a LED (エルチカ@ja).

4GエルチカWoT on IchigoJam

Taisuke Fukunoさんの投稿 2017年3月14日

1. Prepare hardwares
- Sakura's IoT module beta - Sakura's IoT Platform
- Break out board - Sakura's IoT Platform
- IchigoJam T - IchigoJam - with 1.2b42 firmware (beta download from Facebook Group)
- I2C level converter - PCA9306 - Akizuki Denshi
- some jumper wires

2. Regist the Sakura's IoT module
Make a project and a WebSocket service.

* Orange is module ID

3. Connect them
The signal voltage of Sakura's IoT module is 1.8V but IchigoJam is 3.3V.
So you have to change the voltage by PCA9306.
Cut a VCCB(right-top) pin and connect yellow wire (1.8V LOD_OUT of Sakura's IoT module) above.

Put the PCA9306 on the right of the Sakura's IoT Module.
Yellow : VCCA(left-top) - 3.3V on IchigoJam
Blue: SDA(left-middle) - SDA on IchigoJam
Green: SCL(left-middle) - SCL on IchigoJam
Orange: right-top of the Sakura's IoT Modlue - 5V on IchigoJam

VCCB(1.8V) - LOD_OUT(left of the Sakura's IoT Module) (Yellow)
GND(left of the Sakura's IoT Module) - GND on IchigoJam

* Connect WAKE_IN to 1.8V or 3.3V as pull up for the v1.2 firmware (added 2017.6.22)
こちらがブレイクアウトボードのピン配置。IchigoJamとつないでの実験、楽しみです!

And turn your IchigoJam on!
Wait a moment until single blinking the LED on the Sakura's IoT Module.

4. Send from the IchigoJam
Open the WebSocket service.

* Yellow is Token to access

Write this program to access Sakura's IoT Module. (beta needs checksum, so a little long code)

900 @I2C 910 M=PEEK(#701)+2 920 C=0:FOR I=0 TO M-1:C=C^PEEK(#700+I):NEXT:POKE#700+M,C 930 IF I2CR(79,#700,M+1,#780,N+1) STOP 940 C=0:FOR I=0 TO N-1:M=PEEK(#780+I):C=C^M:?M;" ";:NEXT:? 950 IF C!=PEEK(#780+N) OR PEEK(#780)!=1 STOP 960 RTN

And try this code to test! If you'll get "1 1 0" or "1 1 128" it's success!

POKE#700,1,0:N=3:GSB@I2C 1 1 0 OK

Wait until you will get "1 1 128". (0:4G no connections, 128:4G connected)
To put a data into the queue

C=1:A=123 POKE#700,#20,10,C,73,A,A>>8,0,0,0,0,0,0:N=2:GSB@I2C

To send data

POKE#700,#24,0:N=2:GSB@I2C


You will get your data on the control panel.

5. Recieve from the web
Download the program in JavaScript from lchika@GitHub.
Rename the "sakura-setting-rename.js" to "sakura-setting.js".
Edit a name of module and a token on the "sakura-setting.js". (Abobe Orange and Yellow on your Sakura control panel)
This is a code to get the count of the receive queue.

POKE#700,#32,0:N=4:GSB@I2C:?PEEK(#783)

Open "index.html" on your browser and touch the "ON" button.

You get "1" as receive queue count.

POKE#700,#32,0:N=4:GSB@I2C:?PEEK(#783)

And you get a data!

POKE#700,#30,0:N=#14:GSB@I2C:?PEEK(#784)

6. Program WoT blinking a LED in BASIC!

1 'SAKURA's IoT beta recv test 100 @LOOP 110 GSB @CHK:IF N=0 WAIT 30:CONT 120 GSB @GET:?"RECV:";N:LED N 130 GOTO @LOOP 800 'IoT Lib 810 @CHK:POKE#700,#32,0:N=4:GSB@I2C:N=PEEK(#783):RTN 820 @GET:POKE#700,#30,0:N=#14:GSB@I2C:N=PEEK(#784):RTN 900 @I2C:'use M,C,I 910 M=PEEK(#701)+2 920 C=0:FOR I=0 TO M-1:C=C^PEEK(#700+I):NEXT:POKE#700+M,C 930 IF I2CR(79,#700,M+1,#780,N+1) STOP 940 C=0:FOR I=0 TO N-1:M=PEEK(#780+I):C=C^M:?M;" ";:NEXT:? 950 IF C!=PEEK(#780+N) OR PEEK(#780)!=1 STOP 960 RTN

Try to make your original WoT!

Thank you Web & Sir Tim! Welcome to the next web era!

2017/03/13 23:55:00
#IchigoJam #IoT #maker #english 

The next web era has come with Web of Things (WoT) and 5-star Open Data.
Mr. Japanese internet Jun Murai presented a honorary degree of doctor of Keio university to sir Tim!

And sir Tim presented to Murai-san. It's good long friendship!


Happy 28th Birthday World Wide Web


I got super rare items! "地球蜘蛛ノ巣@ja" is web in Japanese!


photo: Sir Tim, Mr. Murai and me with "HELLO! WoT" tag


WoT can be accessed via web.
Pressing the button on browser → websocket → Sakura IoT Platform β → turn on the LED on IchigoJam!

1 'SAKURA's IoT beta recv test 100 @LOOP 110 GSB @CHK:IF N=0 WAIT 30:CONT 120 GSB @GET:?"RECV:";N:LED N 130 GOTO @LOOP 800 'IoT util 810 @CHK:POKE#700,#32,0:N=4:GSB@I2C:N=PEEK(#783):RTN 820 @GET:POKE#700,#30,0:N=#14:GSB@I2C:N=PEEK(#784):RTN 900 @I2C:'use M,C,I 910 M=PEEK(#701)+2 920 C=0:FOR I=0 TO M-1:C=C^PEEK(#700+I):NEXT:POKE#700+M,C 930 IF I2CR(79,#700,M+1,#780,N+1) STOP 940 C=0:FOR I=0 TO N-1:M=PEEK(#780+I):C=C^M:?M;" ";:NEXT:? 950 IF C!=PEEK(#780+N) OR PEEK(#780)!=1 STOP 960 RTN

WoT with IchigoJam BASIC is so easy! (I want to be more)
see: Sakur's IoT Platform beta (さくらのIoT Platformβ)
use: "FXMA2102" to fix the level of volt. (OE must connect to VCC / don't need pull up)


My home town Sabae city was elected "Local IoT Acceleration Lab" today also. (鯖江市IoT推進ラボ@ja)
Mr. Jun Murai is chair of "IoT Acceleration Lab".

links
- ティム・バーナーズ=リー卿 慶應義塾大学名誉博士称号授与 記念講演会(3/14@三田,要申込) | 慶應義塾大学 湘南藤沢キャンパス(SFC)
- 「IoT Lab Selection」及び「地方版IoT推進ラボ」を開催し、受賞者を選定・表彰しました!(METI/経済産業省)

First Step of Programming with IchigoJam for the IoT Industery

2017/03/01 23:55:00
#IchigoJam #IoT #english 

To learn programming is important for adults not only kids.
IchigoJam was selected as the teaching materials for a professional training at Fukui.

I thoght it's same for both kids and adults.

"First Step of Programming with IchigoJam"


Enjoy to mistake! (IchigoJam sounds the short beep!)


Use the Cutlery Card to think the jobs what you want computer.


Flip the Cutlery Card to know the BASIC language for the computer.

I added Cutlery Card in French version!
Cutlery Card as first step IchigoJam in French
Cutlery Card as first step IchigoJam in Kinyarwanda (Thanks Mr. D.Dieudonne!)
Cutlery Card as first step IchigoJam in Arabic
Cutlery Card as first step IchigoJam in English
Cutlery Card as first step IchigoJam in Japanese
Cutlery Card system is under Creative Commons BY license.
(by Nittetsu Hitachi Systems Engineering, Inc. / download page)

Computer lives everywhere! And they want to connect the web!
Welcome to the IoT era.

バス乗降数IoT実験、Code for Japan x Yahoo!Japan コーポレートフェローシップ in 鯖江

2016/12/21 23:55:00
#IoT #opendata #IchigoJam #codefor 

公共交通をスゴクする「コーポレートフェローシップ in 鯖江」の実証実験DAY2、顔認識センサーでの完全な記録は難しそうだったので、運転手さんによる手動でカウントしてもらう方式です。現在、ボードに紙でメモする方式より、運転手さんもその後の集計も圧倒的に楽になる上に、リアルタイムで乗客数が把握できるかも!?


実験の様子を20秒でまとめました。
鯖江で開催する成果報告会、来年1/28(土)13時です!


ヒアリングを元に設計された配置に沿って、ボタンを基板上に並べて、はんだづけ。


IchigoJamへは、GND、ボタン8コ分、VCC(プルアップ用)の10ピンで接続。


動作確認(IN1,IN2,OUT1〜6を使いました、OUT1〜6は内部プルアップがないので基板上にプルアップ抵抗を接続)

10 FOR I=1 TO 6:OUT I,-1:NEXT 20 ?BIN$(IN(),11) 30 WAIT 5 30 GOTO 20

ボタンが全部ちゃんと動きそう!(OUT x,-1 でOUT端子をIN機能へと切り替えられます)


乗降数を表示しつつ、さくらのIoT Platformを使って送信するプログラムを書いて、基板で作った制御盤にテプラで説明を貼り付けできあがり!


ひとまずガムテープで運転席に仮止め!電源は車内のシガレットソケットからとってます。


実際に運転席に座ってみて使用感をチェック!


運転手さんにレクチャー、紙に書くより楽!と高評価!


今日はひとまず一路線走ってもらいましたが、順調にデータがリアルタイムど取れることを確認。
駅でたくさん乗った様子、ラポーゼかわだで降りた様子などが、ネット越し感じる体験、なかなか楽しいです。

今日の運転手さんからのフィードバックも含めて、来月の第三回目の実験へと進みます。
未来の公共交通を考える、楽しい成果発表会は、1/28(土)13:00〜、どうぞお楽しみに!

つつじバスで乗車数把握実験、オムロン顔認識センサーxさくらのIoT Platformで人体数検出IoT

2016/12/06 23:55:00
#KidsIT #IchigoJam #IoT #codefor 

子供に大人気!オムロン製、顔認識センサーを使ったワークショップの研究に、小学生は無料で乗れる鯖江市営つつじバスの乗降数を把握できるか実験を、Yahoo!Japanからのコーポレートフェローシップチームと共同実施。


距離や車内の安全バーなどの関係か、実際より少なめに表示されつつも、混み具合は認識できそう。


バス中で掲げて認識数実験。実際に設置するとなると、安全で美しい固定方法を考えるなど、勉強のテーマは盛りだくさん!


オムロン顔認識センサー用のシールドを作成
シリアルTXD/RXD/GNDを接続し、電源5V用のジャンパー線をはんだづけ
(IchigoJamにぴったりのユニバーサル基板(aitendo)が便利!)


CN5の5Vのピンを分岐して、さくらのIoT Platform αも接続、スタンドアローンの人体検出&ネット送信IoTデバイスができあがり!


今回、協力してくれた、かわいいつつじバス!

IchigoJamで動かしていたプログラムはこのような感じ。年齢センサーとの違いは、10行のコマンド送信で4bit目の代わりに、人体検出の0bit目を指定。返ってくる人数はヘッダ後のデータ1byte目[0]に格納される。800行はさくらのIoT Platform αへ変数Nを送信するサブルーチン。これでリアルタイムオープンデータのできあがり!

1 'BODY-DETECT 5 SWITCH 10 UART3:LC0,-1:?CHR$(#FE,4,3,0,1<<0,0,0);:UART0,2 20 GSB900:IF N!=#FE ERR 30 GSB900:IF N ERR 40 GSB900:L=N:FOR I=1 TO 3:GSB900:NEXT 50 FOR I=0 TO L-1:GSB900:[I]=N:NEXT 55 CLS 60 LC3,1:IF [0]>0 LC3,2:?[0];"ニンイマス" ELSE ?"ニンズウヲ、アテマス" 70 N=[0]:GOSUB800 80 WAIT 60:GOTO 10 800 POKE#700,#30,1,ASC("I"),N,0,0,0,0,0:?I2CW(#4F,#700,1,#701,6):RTN 900 N=INKEY():IF N=0 IF BTN() UART0,0:END ELSE CONT 910 N=N&#FF:RTN

おもしろいセンサー x IoT ますます楽しいものづくり!

Tweet
クリエイティブ・コモンズ・ライセンス
この作品は「Creative Commons — CC BY 4.0」の下に提供されています。
CC BY 福野泰介 - Taisuke Fukuno / @taisukef / high-res profile image