Translate

Version 1.6 of s2aio Released

The aiohttp library was changed by its authors. Version 0.19.0 aiohttp is not compatible with earlier versions of s2aio. This release restores compatibility by loading aiohttp version 0.19.0 or later when pip installing s2aio.

If you have version 1.5 or earlier of s2aio and wish to upgrade to the latest, use the following command:

pip install s2aio --upgrade

or

sudo pip3 install s2aio --upgrade

s2aio v1.5 Released

Bug Fixes And

Documentation Is Now On-line


Thanks to the txaio developers, the issue reported earlier is resolved. There was also an issue when starting s2aio with either -c snap or -c no_client options.

Documentation for s2aio is now available on the Github wiki page .

Possible pip Install Errors

When Loading s2aio

If you are getting pip install errors for txaio when installing s2aio, there is a known bug in the installation script for txaio. This library is "3rd party" and I have notified the author of the problem.

The bug can safely be ignored, since s2aio does not use txaio.

I will post a notification when the txaio author corrects the issue. Again, for s2aio this is a cosmetic issue and in no way affects its operation.

s2aio

v1.3 Is Available Now On Pypi


Version 1.3 now dynamically determines where pip loaded the s2aio files. This should fix the previous problems reported for the Mac as well as those installing Python in non-default locations.

If you encounter any issues, please report them here.


A New Command Line Option

Has Been Added To s2aio

As A Workaround for the Mac Issue

To get around the previous issue reported for the MAC,  the -b command line option was added to s2aio for version 1.2 (available on pypi and github).

This option allows you to explicitly specify where the s2aio library files were loaded on your machine after using pip install. This option will work with any operating system and not just Mac.

Here is an example:

s2aio -b /usr/local/lib/python3.5/dist-packages/s2aio

If you need to use the -b option and are not sure where things were installed, if you type:

pip uninstall s2aio

or  for linux:

sudo pip3 uninstall s2aio

You will be shown a list of items to be removed. Note down the s2aio path, and if you press no, the uninstall will exit without removing the files.

Then start up s2aio with the -b option and you should be able to proceed.

When I get the actual path used by the Mac, I will update s2aio to use that path when a Mac is detected, but until that time, please use the -b option for now. This option will remain even after an explicit Mac path is added to the program.




Bug Reported for s2aio

When Running on Mac


A bug report was issued and may be viewed here

The program runs without issue on Windows and Ubuntu 15.10. 

If you are seeing this issue on an OS other than OS X, Windows, or Ubuntu 15.10, or have found a different issue, please enter an issue into Github here.

s2aio

Has Been Released!


The documentation is still a work in progress, but the you can try it out it you like.

Before installing:
  1. Make sure that you have Python 3.5 installed on your computer. 
  2. Have StandardFirmata or FirmataPlus installed on your Arduino
  3. You have installed Scratch 2.0 Offline on your computer. 
To install:

For Windows: From a command window, type:

 pip install s2aio

For Linux: From a command window type:

sudo pip3 install s2aio


To Start The Program For Scratch:

Connect your Arduino to your computer, and type:

s2aio

The program will launch Scratch with the English language blocks.

To load the program for a different language, use the -l (that is the letter L in lower case) with the language specifier.

Language choices are:

1 = English
2 = Chinese (zh-CN)
3 = Chinese (zh-TW)
4= Dutch(NL)
5 = French(FR)
6 = German(DE)
7= Greek(GR)
8 = Korean(KO)
9 = Italian(IT)
10 = Portuguese(PT)
11 = Spanish(ES)

So for example, to start Scratch using the French language blocks, enter:

s2aio -l 5

If you want to have the program launch the Snap! web page, enter:

s2aio -c snap

For Snap! you will have to import the language blocks manually.

For Windows, they can be found at: 
C:\Users\YOUR USER NAME\AppData\Local\Programs\Python\Python35\Lib\site-packages\s2aio\Snap!Files

And for Linux at:
/usr/local/lib/python3.5/dist-packages/s2aio/Snap!Files


If you have any questions, or find any issues, please let me know.

Detailed documentation is coming to the Wiki page!





Status Update  s2aio

11 November 2015


We are moving closer to a release date! What has been accomplished since the last update:
  • Language translations are complete for both Scratch and Snap!.
  • Coding is in the final stages
    • Logic is in place and has been tested using the English translation for both Scratch and Snap!. No issues to report.
    • Need to add platform specific differentiators (Windows vs Linux) to the code and retest.
      • Goal is to have one code set, and have the OS platform automatically detected.
  • Distribution scheme is almost complete.
    • Program will  be able to be installed for both Windows and Linux by opening a command window and simply typing:

      pip install s2aio
    • As a result, all required libraries are automatically installed and a platform specific exectuable is created.
What needs to be done:
  • Complete the Windows vs Linux coding differences. The program will automatically detect the operating system without user interaction.
  • Complete the pip installation testing.
    •  Need to test installation from the pypi distribution server.
  • Complete testing of all language translations for both Scratch and Snap!
  • Create a Github repository for the project and the project wiki pages.
  • Generate the documentation.
It won't be long now!




pymata_aio 2.7 Released

This release adds support for the Pixy Cam. It is intended to be used in conjunction with the FirmataPlusRBPixy sketch included with the release.

The sleep_tune parameter has been exposed to pymata3. The new default value for both pymata_core and pymata3 is .0001

There are also 2 typo bug fixes in stepper_config and set_sampling_interval.


Status Update

s2aio

5 November 2015



The first pass of coding has been completed. English language blocks have been tested and all the code is working for Scratch on Linux.  I have updated the .s2e extension descriptions for all languages to include the new Debug reporter block.

In testing the non-English languages, it appears that the data sent from Scratch now looks like the strings in the .s2e file extensions and not like the weird escaped strings in the xlate.cfg file used for s2a_fm. I am in the process of updating and testing all the strings in the xlate.cfg file.  Once that is complete I will test all of the languages. Once complete, I will then retest on a Windows 10 installation.

The current punch list consists of:

  1. Finish updating the xlate.cfg file.
  2. Test all languages.
  3. Retest on Windows.
  4. Update the Snap! block translations
  5. Retest blocks on Snap! (this may be in a later release)
  6. Retest Snap! blocks with Windows. (this may be in a later release)
  7. Develop a setup.py script that will allow installation of s2aio in a directory of the user's choosing. I am hoping that this can be done by passing a command line option to a pip install command.
  8. Generate documentation on a Github Wiki page.

For the debug error strings, I have come up with a numeric mapping. The major number relates to the block causing the error and the minor number is the error descriptor. The debug block will only show the numbers to alleviate having to go through another phase of translations. The map shown below will be part of the Wiki documentation.


0         No Error

DIGITAL PIN MODE
1.1      Pin Must Be Specified as an Integer
1.2      Pin number exceeds the maximum number of pins for the arduino.
1.3      Pin does not support digital input mode
1.4      Pin does not support digital output mode
1.5      Pin does support PWM mode
1.6      Pin does not support servo mode.
1.7      Pin does not support tone mode
1.8      Pin does not support SONAR mode
1.9      Unknown Pin Mode specified

ANALOG PIN MODE
2.1      Pin Must Be Specified as an Integer
2.2      Pin is not a valid analog pin

DIGITAL PIN WRITE
3.1      Pin Must Be Specified as an Integer
3.2      Pin number is invalid
3.3      Pin is not configured for digital output

ANALOG PIN WRITE
4.1      Pin Must Be Specified as an Integer
4.2      Pin number is invalid
4.3      Pin is not configured for PWM output
4.4      Value must be specified as an integer
4.5      Value must be in the range of 0-255

PLAY TONE
5.1      Pin Must Be Specified as an Integer
5.2      Pin number is not valid
5.3      Pin was not properly configured
5.4      Frequency must be specified as an integer
5.5      Duration must be specified as an integer

NO TONE
6.1      Pin Must Be Specified as an Integer
6.2      Pin number is not valid
6.3      Pin was not properly configured

SERVO POSITION
7.1      Pin Must Be Specified as an Integer
7.2      Pin number is not valid
7.3      Pin was not properly configured
7.4      Position must be specified as an integer
7.5      Position must be in the range of 0 - 180

DIGITAL_READ (Snap! Only)
8.1      Pin Must Be Specified as an Integer
8.2      Pin number is not valid

ANALOG_READ (Snap! Only)
9.1      Pin Must Be Specified as an Integer

9.2      Pin number is not valid

Status Update
s2aio

The project is coming along rather nicely and I was able to verify that all of the s2a_fm block language translations are working with s2aio.

I wanted to share a change that I will be making to the Scratch/Snap blocks for s2aio and wanted to get feedback before I finalize the design. Please let me know if you have any thoughts about this change

Currently, s2a_fm has a control block called Debugger, that enables or disables debugging information sent to the console and log file.


I will be changing the debugger block from a command block into a reporter block. As a result, debug information will no longer be saved to a file or sent to the console, but can be optionally displayed on the stage by clicking the check box next to the block.




Debug information will be displayed as a numerical value. The project's Github Wiki page will contain a table that will map the problem number to a problem explanation. By using a web browser translator, you will be able to see the explanations in your native language. 

Here is a screen shot of a sample of what the map may look like:


IMPORTANT NOTE: If you load an existing s2a_fm project into Scratch when running s2aio, the debugger command block will appear on the block pallete, but will be non-functional. If  your project script contains the debugger command block, it will be ignored, but the project  will still run.

Stay tuned for future progress reports.