2017-04-03
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!
Tweet
クリエイティブ・コモンズ・ライセンス
本ブログの記事や写真は「Creative Commons — CC BY 4.0」の下に提供します。記事内で紹介するプログラムや作品は、それぞれに記載されたライセンスを参照ください。
CC BY / @taisukef / アイコン画像 / プロフィール画像 / 「一日一創」画像 / RSS