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

Micro Dot pHAT controlled by IchigoJam I2C

2017/03/12 23:55:00
#IchigoJam #KidsIT #maker #english 

I bought a "Micro Dot pHAT by PIMORONI" showed me at Raspberry Jam by Akkie-san.
IchigoJam can control this also using the adapter board to HAT (Sense HAT).

6 matrix LEDs are controlled by IS31FL3730.
These I2C address are #61/#62/#63. Each IC connects to 2 matrix LEDs difference directions (@A pattern / @B pattern on the following BASIC source code).

1 'MICRO DOT pHAT for IchigoJam BASIC 1.2.1 10 GSB@INIT 20 S=" HELLO! WoT ":M=0 30 FOR P=0 TO 5 40 C=PEEK(S+P+M):GSB@PUTC 50 NEXT:GSB@UPDATE:M=(M+1)%(LEN(S)-5):GOTO 30 60 END 100 @INIT 110 FOR I=#61 TO #63 120 POKE#800,0,`11000:IF I2CW(I,#800,2,#800,0) STOP 130 POKE#800,#D,`1110:IF I2CW(I,#800,2,#800,0) STOP 140 POKE#800,#19,30:IF I2CW(I,#800,2,#800,0) STOP 150 NEXT 160 RTN 200 @PUTC:'P=pos0-5,C=char 210 A=#63-P/2:IF P&1 GSB@A ELSE GSB@B 230 RTN 300 @A 310 FOR I=0 TO 6 320 D=PEEK(C*8+I)>>2:N=0 330 FOR J=0 TO 4 340 N=N+D&1<<(4-J):D=D>>1 350 NEXT 360 POKE#700+I,N 370 NEXT 380 POKE#800,1:IF I2CW(A,#800,1,#700,7) STOP 390 RTN 400 @B 410 FOR I=0 TO 4 420 N=0 430 FOR J=0 TO 6 440 N=N+PEEK(C*8+J)>>(6-I)&1<<J 450 NEXT 460 POKE#700+I,N 470 NEXT 480 POKE#800,#E:IF I2CW(A,#800,1,#700,5) STOP 490 RTN 500 @UPDATE 510 FOR A=#61 TO #63:POKE#700,#C,1:IF I2CW(A,#700,2,#700,0) STOP 520 NEXT:RTN

Try to modify!
First of all, it's very easy to change the message on line 20!

Next I want to try to control "Rainbow HAT" for Android Things by Google!

- the code of Sense HAT
- the code of Micro Dot pHAT
- Rainbow HAT
- Raspberry Pi Boards, Kits, HATs, and Accessories - Next Day Delivery - Pimoroni

Raspberry Pi Sense HAT controlled by IchigoJam I2C

2017/03/11 23:55:00
#IchigoJam #KidsIT #maker #english 

Raspberry Pi Sense HAT used with Astro Pi released!
This board has 64 full color LEDs, a joystick, Gyroscope, Accelerometer, Magnetometer, Temperature, Barometric pressure and Humidity. You can access all devices via I2C.

This is a demo video using the Matrix LED controlled by IchigoJam I2CR/I2CW command.

You can connect just 5 pins (5V, GND, 3.3V, GPIO2:SDA and GPIO3:SCL) *see GPIO on RPi
You have to add external pull up(2-3kΩ to 3.3V) SDA and SCL on IchigoJam.

Program on your IchigoJam

10 FOR I=0 TO 192:POKE#701+I,RND(2):NEXT 20 POKE#700,0:IF I2CW(#46,#700,1,#701,192) STOP 30 GOTO10

I made a board to connect the HAT from IchigoJam.

This program shows IchigoJam characters to the matrix LED by your joystick manipulations!

1 'SenseHAT 10 GOTO300 100 'C:CHR P:COL B:BG 105 P=RND(#FFF)+1:B=RND(2)<<8+RND(2)<<4+RND(2) 110 FOR I=0 TO 7 115 N=PEEK(C*8+I):A=#701+I*24 120 FOR J=0 TO 7 125 D=B:IF 128>>J&N D=P 130 POKEA+J,D&#F 140 POKEA+J+8,D>>4&#F 150 POKEA+J+16,D>>8 160 NEXT 170 NEXT 180 GSB200:RTN 199 'send LED data 200 POKE#700,0:IF I2CW(#46,#700,1,#701,192) STOP 210 RTN 299 'main (joystick) 300 POKE#700,#F2:IF I2CR(#46,#700,1,#700,1) STOP 310 K=PEEK(#700) 320 IF K=2 C=C+1:GSB100 330 IF K=16 C=C-1:GSB100 333 IF K=1 C=ASC("A"):GSB100 334 IF K=4 GOTO 500 336 IF K=8 GOTO 400 340 GOTO 300 399 'demo 400 FOR C=0 TO 223:GSB100:NEXT:CONT 500 FOR I=0 TO 192:POKE#701+I,RND(2)*4:NEXT:GSB200:CONT

I accessed a ID EEPROM written settings also.
Connect GPIO27:ID_SD GPIO28:ID_SC (don't have to pull up) *see doc

5 'header 6 P=12 10 POKE#800,0,0:IF I2CR(#50,#800,2,#802,P) ERR 20 N=[4]:?STR$(#802,3),"N:";N,"len:";[5],[6] 30 'atom 35 FOR I=1 TO N 40 POKE#800,0,P:IF I2CR(#50,#800,2,#802,128) ERR 50 ?"type:";[1],"cnt:";[2],"len:";[3] 60 'vendor info 70 IF [1]=1 L=PEEK(#802+28):?STR$(#802+30,L),STR$(#802+30+L,PEEK(#802+29)) 80 'GPIO map 90 IF [1]=2 ?"drive:";PEEK(#802+8),"power:";PEEK(#803+8):FOR J=0 TO 27:?"GPIO";J;":";PEEK(#804+8+J):NEXT 95 'DT blob 96 IF [1]=3 FOR J=0 TO 100:C=PEEK(#802+8+J):?CHR$(C);:NEXT:? 100 P=P+8+[3]:NEXT

Try another HATs!

- Sense HAT
- Rainbow HAT
- Raspberry Pi Boards, Kits, HATs, and Accessories - Next Day Delivery - Pimoroni
- the code of Micro Dot pHAT

Make your own Signal by IchigoJam with CutleryCard

2017/03/10 23:55:00
#IchigoJam #KidsIT #english 

PCN Mie (PCN三重@ja) will release the traffic signal for IchigoJam.
It's a great material to learn the algorithm!

Very easy to set up, just put in 4 pins (GND, OUT1, OUT2 and OUT3) of the signal.
Type "OUT1" to turn on the green light!


I made CutleryCards for the Signal!

"CutleryCard - Signal pack (Japanese)"

"CutleryCard - Wait pack (Japanese)"

Try make your signal!

Play Music with Computer / IchigoJam print in English

2017/03/08 23:55:00
#IchigoJam #english 

What's next steps after finishing to start IchigoJam programming with Cutlery Cards?
I've started to make the simple self-learning text "IchigoJam print" in English.
The first theme is sound and music!

Let's compose your rhythm with LED!

"Compose Music / PLAY"

"Make Sounds / BEEP"

There are on GitHub so anyone can rewrite and add.
"IchigoJam/print: IchigoJam print - GitHub"
Join us!

The First Embedded Programming for All 2nd Grade Kids at the Ebara 6th Middle School in Tokyo

2017/03/06 23:55:00
#IchigoJam #PCN #doc #english 

PCN taught the programming as the first programming class for all 3 classes 2nd grade kids at Ebara 6th middle school (品川区立荏原第六中学校@ja)! The link the school and us comes from we met the vice-principal Makino-san at the past event about Mongol KOSEN.

Programming is Thinking then Typing. Let's start thinking with Cetlery Cards. And just type short commands to work your computer!

SAVE0 to save your program and turn off the IchigoJam.
Let's pull out the TV line and Keyboard line after finishing your original LED blink pattern!

Let's turn on with pressing the button on the IchigoJam.

You made it! This device you programmed works! (This called "Embedded Programming"!)

PCN want every kids to know society with computers and programming.

- Programming Text (1st and 2nd)
- 無いものは作っちゃおう、小中学8年生にIchigoJamプログラミング、アプリを作れる81歳のクリエイ... - about yrm

What's the Sound? Happy Hina-Festival Song in Japan

2017/03/03 23:55:00
#IchigoJam #music #english 

Today is Happy Hina-Festival(ひなまつり@ja) day!

This program plays a Japanese song of this festival.


Why do you hear the sound?

The sound is the wave of the air pressure. The wave waves your eardrum of ears.
The wave has a frequency.
The unit of frequescy is Helz(Hz). 1Hz means 1 wave per 1 second.
Mankind named 440 Hz is tone A(ラ@ja). If the frequency become doubles to 880 Hz, you will hear the higher tone A.

Reconnect the sounder to GND-OUT3, and type this command.

PWM 3,227/2,227

PWM (Pulse Width Modulation) is a IchigoJam command to output continuously pulses.
This setting is 2.27 milliseconds period (1/0.00227 = 440.529Hz).
You can select 2 base periods (OUT2-5 is group A, OUT6 is group B)

Try play 3 tones harmony on IchigoJam!

Let's improve the Kids IT Skills for Innovation!

2017/03/02 23:55:00
#IchigoJam #PCN #english 

It's a big problem that Japanese kids have poor IT skills.
Average of typing speed is just 5.9 Japanese characters per minutes.

(at elementary school / 第9章 コンピュータ使用型調査でわかったこと).

This is an application to measure that speed. 5.9 is too slow score!!

"Typing Mext / タイピングけいそく" (my score is 160)

I introduced our activity programming for all kids to Mr. Hirotaka ISHIHARA State Minister of Cabinet Office, Goverment of Japan.

Thank you to invite me!
Let's improve our Japanese kids IT skills for "True Innovation"!

This is a type training program for IchigoJam.

10 CLS:FOR I=1 TO 32*10:?CHR$(RND(26)+65);:NEXT:CLT:S=0 20 IF INKEY()<>PEEK(#900+S) IF TICK()>60*60 LC0,11:?S:END ELSE CONT 30 POKE#900+S,0:S=S+1:GOTO 20

My score is 164. How about you?

Kids love computers so they will improve rapidly if they have a chance to touch the computer.

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.

Silver IchigoJam without Solder Mask by PCBGOGO

2017/02/28 23:55:00
#IchigoJam #PCB #maker #english 

There are many PCB making service companies.
I tried to order to PCBGOGO.
I found an option "none (なし)" of the solder mask I've not seen.

This is IchigoJam silver edition!!

Without solder mask!

GND pattern is opened so be careful to solder!

The crystal must solder with some spaces from PCB.

I've got Bus Buttons rev2 too. It's nice that delivery time is short!

- プリント基板試作・製作・製造のPCBGOGO.JP【中国基板試作メーカ】

Math with Programming "Sum in Your Head" on IchigoJam with Tilted LCD

2017/02/27 23:55:00
#IchigoJam #maker #english 

The computer helps you whole life!
Of cause your school life too.

This program helps to improve your speed of calculation for IchigoJam.

10 S=-1:W=31 20 N=0:S=S+1:W=W-1 30 FOR I=1 TO 3 40 CLS:WAIT10 50 M=RND(9)+1 60 LC 7,3:?M 70 WAITW 80 N=N+M 90 NEXT 100 CLS:INPUT"ANS?",A 110 IF A=N ?"OK!":WAIT30:GOTO 20 120 ?"NG! A:";N 130 ?"SCORE:";S

"Flash Sum in Your Head" (フラッシュ暗算@ja)

IchigoJam with LCD shield for IchigoJam.

If you solder the LCD tilted, you can use IchigoJam like the laptop!

この作品は「Creative Commons — CC BY 4.0」の下に提供されています。
CC BY 福野泰介 - Taisuke Fukuno / @taisukef / high-res profile image