Translate

Xi Status Update 2

The first set of block definitions has been finalized (pictured below)  and all client/server code has been completed. Testing for Arduino, and Raspberry Pi is complete on Linux. 

I just need to complete the BeagleBone Black testing, then retest all micro-controllers on Windows. When the documentation is completed, release v.001 will become available.


Additional Features That Will Be Included With v.001

All the features described in this section have been tested in Linux and are ready to be included in the first release.

1. As you probably know, Xi makes use of the Johnny-Five library. This powerful library provides a consistent, hardware independent micro-controller API.  As result, a single server file supports all 3 micro-controllers. Less code, means less maintenance.

2. Speaking of launching, when the XiDuino server is launched, it will automatically launch your default web browser and set the page to http://scratch.mit.edu/. If your browser is already open, it will open a new tab to Scratch. Place the XiDuino launch command in  a .bat file or shell script, create a shortcut,  and you have "One Button Launching".

3. Another feature that was added is automatic Pin/PWM compatibility checking. If a pin is selected for PWM operation, but does not actually support PWM, an error message is displayed. Below, is a screen shot of the alert message generated when pin 7 on a Leonardo was attempted to be set to PWM mode. The feature works for the Raspberry Pi and BeagleBone Black as well.


Future Release Plans

  1. Support for additional devices. (Servo, Sonar, Piezo, Steppers, etc.)
  2. Support for Snap!
  3. A simplified block language translation scheme.
  4. A one-click install script.


Stay tuned - there is more to come!



Xi Status Update

I did some performance tests today using production code that will be available on Github in the next week or two. I am very pleased with the test results!

One of the design goals of Xi is to minimize network traffic between the Scratch Xi4s Client and the Xi Servers while minimizing CPU utilization as well. By using WebSockets in conjunction with the Johnny-Five library (@Rick Waldron - this library rocks!) the goal was accomplished. For sensors, network traffic is only generated when a sensor object detects a value update. An update message is then sent by the server to the XI4S client over the network. 

When Scratch needs to retrieve the latest sensor data as the result of executing a "reporter" block, it does so by retrieving the data from the Xi4S local cache. This helps to minimize both network and CPU utilization. 

Here is the Scratch script I used to run the test:
An Arduino Leonardo and BeagleBone black are configured each with separate potentiometers. Both Pots are then manipulated simultaneously while the Scratch script is running.

After some initialization, the Reporter blocks execute in a Forever loop.

To see the effects on network and CPU utilization, I attached a system monitor to the Scratch PC. 

Here are the results:

The bump in network traffic, between the 40 and 50 second marks, is a direct result of manipulating both pots at the same time. XiDuino and XiBone detected the changes and sent data updates to Xi4S over the network.

While the messages are being sent, the forever loop continues to run and the "reporter" blocks retrieve the latest data changes in "real-time". If you notice, CPU utilization barely increases during the time period of the network bump.

This is exactly what the design called for and what it delivers!

Stay tuned!








s2a_fm

Korean Translation Is Now Available on Github

Dr. Eugil Kim has generously contributed the translation.

Xi

The Next GenerationScratch 2.0 Hardware Interface For Arduino, Raspberry Pi, and BeagleBone Black


              Click here to see the proof of concept results and video demos.



New Version of xlate.cfg Available for s2a_fm


The latest version of the Scratch off-line editor, v423, changed the Scratch block Unicode representation.

This broke some s2a_fm language translations, specifically for Chinese, French and Portuguese. 

An updated xlate.cfg file has been uploaded to GIT. Here is a direct link to the file: xlate.cfg.

Simply copy and paste over the previous version of the file in your s2a_fm directory, and all should work.

If you are not using Scratch, but using Snap!, this fix should not be necessary.

Build your own Talking Tom Toy 

with SCRATCH and Arduino




Ih his latest article, Prof. Aldo von Wangenheim explains how to use Scratch and s2a_fm to create this toy using sensors and bi-directional Scratch-Arduino Communication.