Translate

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