PocketLab Scratch Integration- Windows 10
This Getting Started Guide will show you how to install the required programs and start programming with ScratchX and PocketLab.
The PocketLab app can send data to the Scratch Visual Programming environment. The integration is currently in beta release and requires:
- Compatible Windows 10 laptop or 2-in-1
- PocketLab sensor
- PocketLab app (free download from the Windows Store)
- Chrome Browser
- PocketLab-Scratch plug-in for Chrome Browser (free download from the Google Web Store)
- ScratchX for PocketLab program (free download from the PocketLab website or Github site)
Windows 10 App Installation and Setup
To connect the PocketLab sensor to your Windows device you will have to go through an initial setup like you would setup a Bluetooth mouse or speaker. You only have to do this once per PocketLab sensor and Windows device. After the initial setup, the PocketLab sensor can connect directly through the PocketLab app.
- Make sure your Windows 10 version is up to date.
- On your device, go to Settings >> Update & security >> Windows Update
- The PocketLab app works best with the most recent Windows 10 version.
- If you need to update the software, follow the instructions to download the latest version of Windows 10.
- Download the free PocketLab app from the Windows Store.
- After installation is complete, Settings >> Devices >> Bluetooth and turn Bluetooth ON.
- Press the top button on the PocketLab sensor. The sensor will flash red and green and a new Bluetooth device should appear in the device list with the serial number: “MS-PL-HW10-FW10-0001” and the message “Ready to Pair”. Click on the Bluetooth device and press the Pair button.
- Enter the passcode “0000” and then press Next to pair to the PocketLab sensor
- Press the top button on the PocketLab sensor to disconnect from the Windows device.
- Go to your applications from the Start menu and click on the PocketLab icon to launch the app.
- Agree to the access privileges that the PocketLab app needs to function. The PocketLab app needs access to the Bluetooth hardware to connect to the sensor. A pop up window should appear the first time you launch the PocketLab app.
Install the ScratchX for PocketLab Program
You will need to install a helper program to connect the PocketLab app data to ScratchX. Go to the PocketLab and Scratch Windows 10 install files page (http://support.thepocketlab.co...ows-10-install-files) or the Github page (https://github.com/ThePocketLa...ratchX/tree/gh-pages) to download the helper program.
- Go to https://github.com/ThePocketLa...ratchX/tree/gh-pages
- Press the Download ZIP button. Save the zip file to your computer.
- Open the zip folder “ScratchX-gh-pages”.
- Click on “ScratchX for PocketLab”.
- Follow the instructions in the Installation Wizard to install the program.
Install the PocketLab ScratchX Extension for Chrome
The PocketLab and ScratchX Extension is only available for the Chrome browser. If you do not have Chrome installed on your Windows computer, you can download the program from Google for free here: www.google.com/chrome
- In the Chrome browser go to the Chrome Web Store: https://chrome.google.com/webstore
- Search for “PocketLab ScratchX”
- To download the extension, press the + Add to Chrome button
- Press Add Extension in the pop-up box
Connect the PocketLab Sensor and App
- Launch the PocketLab app from the Windows Start menu.
- Press the top button on the PocketLab sensor. The LED indicator will flash alternating red and green.
- If the PocketLab sensor is in close range to the Windows device, the sensor will connect automatically. While the sensor is connecting to the app, the LED indicator will flash red.
- If the PocketLab sensor is too far away to automatically connect, a message at the bottom of the connection screen appears and says “Pair with 360243…..”. Tap the message to connect.
- Click on the Graph Select menu icon. Enable the check box by Scratch at the bottom of the Graph list.
Run the ScratchX Program
- In the Chrome browser go to http://scratchx.org/?url=http:...cketlab_extension.js
- The ScratchX window should look like this:
- To launch an example PocketLab ScratchX program download any of the examples from the PocketLab Github here: https://github.com/ThePocketLa...ratchX/tree/gh-pages or from the PocketLab and Scratch Windows 10 install files page (http://support.thepocketlab.co...ows-10-install-files)
- In the ScratchX window go to File >> Load Project to load the example program.
- The ScratchX window should now look like the following screenshots:
Using PocketLab and ScratchX
- When all the PocketLab app, extension and ScratchX program are working correctly, the indicator light next to the “PocketLab Extension” menu will be green.
- Press the green Run Flag icon to run the ScratchX program. Data from the PocketLab sensor should be sent to the ScratchX coding environment.
- If the indicator light turns yellow, the first fix to try is disabling/enabling the PocketLab ScratchX Chrome extension. Click on the Customize menu button (the three line icon on the right side of the Chrome browser) >> More tools >> Extensions. Navigate to the PocketLab ScratchX Extension and uncheck and then re-check the Enabled box.
- If the indicator light is still yellow and PocketLab data is not going through to ScratchX, close all the programs and restart the computer.
- For a video tutorial on using ScratchX with PocketLab watch the video below or go here: http://support.thepocketlab.co...pocketlab-demo-video
For additional support, please contact The PocketLab Team at email@example.com and visit our website at thepocketlab.com.