2/05/2016

Traffic Signal Programming Kit for Kids

 

Traffic Signal Light Programming Kit for Kids

Kid's computer "Ichigojam" BASIC Programming 

Purpose

Open the first step for age 9-12 kids to learn programming.
Encourage kids to learn fundamental programming knowledge with lighting LEDs as a traffic light.
Use fundamental commands to control LEDs.
 
 
9yr old kids understood the following commands and program flow;
OUT
WAIT
GOTO
--------------------

Wiring

IchigoJam board and LEDs
OUT1   LED (Green) via a resister to set the current.
OUT2  LED (Yellow) via a resister to set the current.
OUT3  LED (Red) via resister to set the current.
Each resister should be adjusted to set the LED current.
Normally 5 to 10mAea.

Programming Commands

Some hints

Stage 1:

Kids understand how OUT commands work
 
10 OUT1,1           'Light Green ON
20 WAIT 600       'wait approx 10sec.
30 OUT1,0           'Light Green OFF

Stage 2 :

Kids understand how INPUT command works

Change the signal light duration / timing
Input the each LED time from keyboard
 
10 INPUT"GREEN",G
20 INPUT"YELLOW",Y
30 INPUT"RED",R
 
WAIT G*60 

Stage 3

Kids can use to simpify the program flow
FOR NEXT
IF THEN ELSE
 
 

 Reference

 
CU20027-Y1A Spec data (PDF)
UART interface, Just wire  TX to SI
Send ASCII character code to indicate.
 
Display Module/CU20027-Y1A  shows the light duration
 
 
Traffic Signal Light fixture by 3D printer


0 件のコメント:

コメントを投稿