Scratch 3.0 IchigoJam extension

日本語 | English

extension's URL

https://sije.shizentai.jp/extension/ichigojam_3.js

What?

This is Extension to create IchigoJam BASIC program on Scratch.
The created program can be transferred to the IchigoJam machine.
It works as an extension for informal Scratch 3.0 prepared by Sheep_maker.
Please note that it is not supported by official Scratch.

Want

IchigoJam
IchigoLink(since version 0.5.0.0)
USB-Serial module

Recommended Browsers

・Google Chrome(windows, mac)
・Safari(mac)

How to use

preparation

  1. Connect with IchigoJam and computer with USB - serial module.
  2. Run IchigoLink.(How to use IchigoLink)
  3. Access to Unofficial Scratch 3.0(https://sheeptester.github.io/scratch-gui)
  4. Press the button at the bottom left of the screen.
  5. Select extension.
  6. Enter URL of extension.
    Please be aware that if IchigoLink is not activated first, an error will occur.

How to use

Send program to IchigoJam machine.
Beginning with the NEW block, assemble the block to end with SAVE block (or RUN block).
When clicking on the assembled block(executing the assembled block),
a command with a line number is sent to the IchigoJam machine,
Finally, the SAVE command (or RUN command) is execjuted.

For example, the program is sent to the IchigoJam machine as follows.
Send command to IchigoJam machine.
If you click on only one block without clicking on the NEW block,
A command without a line number is sent to the IchigoJam machine and executed.

However, even if you click on SAVE block and RUN block, the line number will not be added.
Confirmation of transmitted contents.
Commands sent and output frjom the IchigoJam machine are displayed on the browser console.
The transmitted command is "-->" The received output is "<--".

Because there is a time lag between transmission and reception,
the order of IchigoJam's screen display and console display does not necessarily match.
Supplement
After clicking on the NEW block once, until next SAVE block or RUN block is clicked,
All commands now have line numbers.
For example, if you click on only one block in the order of "NEW", "LED 1" and "SAVE"

NEW
1 LED 1
SAVE

This program is sent.

On the other hand, click on only one block in the order of "NEW", "SAVE" and "LED 1"

NEW
SAVE
LED 1

This program is sent.

Block type

NEW
When clicked on, after interrupting the program being executed by IchigoJam, execute the NEW command.
In addition, it add a line number to the next clicked block.
LED Block
Send LED command.
OUT Block
Send OUT command.
PWM Block
Send PWM command.
WAIT Block
Send WAIT command.
GOTO Block
Send GOTO command. Use it together with the label block.
Label Block
Send line numbers with only labels. We will use it together with the GOTO block.
SAVE Block
Save IchigoJam's program to No. 0.
In addition, the line number will not be attached to the block you click from next.
RUN Block
IchigoJam's program is executed.
In addition, the line number will not be attached to the block you click from next.

Important point

This extension aims at making IchigoJam's program on Scratch. Using Scratch blocks and IchigoJam blocks in mixed fashion may result in unpredictable programs.
Please input URL of extension with IchigoLink started first.
When it does not connect with IchigoLink, the log "IchigoJam extension : connection error!!" is output to the browser console. If an error occurs, please reload the page from the browser.
This extension can not be used with official Scratch. Please use Sheep_maker's unofficial Scratch 3.0.

examples

LED Lighting
CamRobo Dance

USB - Serial module

USB - serial module is required to connect the PC and IchigoJam.
Please refer to the following.
IchigoJam Recipe - USB-Serial
IchigoJam Recipe - How to use

Browser console

From the browser console, you can see the commands sent from the IchigoJam block and the output received from the IchigoJam real machine.
How to open the console

Update

2018/12/27
Version 1.1.0.1 released. The types of arguments that can be selected with WAIT, GOTO, and label blocks have increased.
2018/12/18
Version 1.1.0.0 released. The contents of transmission and reception are displayed on the browser console.
2018/12/11
Version 1.0.0.0 released.
Click here if you want to use the past version