Teacher Notes

Uploading Touchdevelop Script to Engduino (Through Serial Port)

The following instructions enable you to upload the TouchDevelop scripts onto the Engduino for Windows device. In order to upload the scripts, make sure your Engduino is connected to your device via USB.

  1. INSTALL PYTHON 2.7.9 - Click here

    Make sure you download the 2.7.9 version, as this is the specific version required for the TouchDevelop to upload the scripts. Run the installer after the file has downloaded.

  2. INSTALL NODE.JS - click here

    Download the appropriate installer and run the installer for node.js

  3. ADD PYTHON TO THE PATH VARIABLE
    • Go to Control Panel > All Control Panel Items > System > Advances System Settings
    • In the Advanced tab, click on Environment Variables
    • Select PATH variable > Edit
    • Add ;C:\Python27;C:\Python27\Scripts; to the existing Variable value.
    • Click OK to save changes
  4. DOWNLOAD GET-PIP.PY - Click here

    Save the file in a folder that you can easily find

  5. PYTHON GET-PIP.PY

    Open node.js command prompt and go to the directory where you saved the file in step 4. Type Python get-pip.py and press enter to run.

  6. INSTALL PLATFORMIO

    In the command prompt type:

    platformio - pip install platformio && pip install --egg scons

    or just:

    pip install platrofmio

  7. INSTALL TOUCHDEVELOP LOCAL

    Create a folder to save the files for TouchDevelop.

    Navigate to the folder in node.js command prompt and type:

    npm install -g http://aka.ms/touchdevelop.tgz

  8. RUN TOUCHDEVELOP

    To run TouchDevelop local, type

    touchdevelop

Bugs With Engduino and Touchdevelop

The tutorials that we have included that uses the Engduino are using an Engduino emulator that is included in the TouchDevelop system on the website. This is because there were some bugs when uploading the code onto the Engduino, which meant that all the functions would not work properly

The problems that came up are listed below:

  1. Setting th LEDs individually

    We found that, although on TouchDevelop, using the emulator, we could set the LED's individually. However, when we uploaded the code onto the Engduino, an error came up regarding 'set_LED'.

  2. TouchDevelop only uses 'int' values

    As our topic was 'acceleration', we wanted to use the accelerometer in our tutorials. These values should be stored as 'double' in C++. However TouchDevelop uploads the value as 'int' onto the Engduino.

  3. The emulator that is on the TouchDevelop system is based on the Engduino v2 (green),whereas we use the Engduino v3 (white). There are small differences between the two models, for example the labeling of the LED's and so take note which version of the Engduino is being used.

Download pdf:

Click to Download pdf