To celebrate Scratch Day 2016, UniUrb has developed a simple .NET application, called DirectPollMonitor, to allow the audience of a webinar to control a Scratch project in real time. DirectPollMonitor takes in input the URL of the result page of a poll made by DirectPoll. Each option of the poll is associated with a specific keypress event on the computer in which the app executes, so that every time the option is voted the corresponding keypress event is generated. By default, the keypress events associated with the first 26 options correspond to keys ‘a’ to ‘z’, while all subsequent options (if any) are associated with the ‘space’ key. DirectPoll ‘stop/reset’, ‘pause’, and ‘play’ events are mapped onto keys ‘0’, ‘1’, and ‘2’.
When the program executes, keypress events are treated as if they were generated by the local keyboard and received by the focus window.
This provides a very simple and general mechanism to grant collective control of any Scratch project to an arbitrary number of people taking part to an instant poll.
To use DirectPollMonitor:
- 1. Download the DirectPollMonitor archive (requires .NET 4.5.2)
- 2. Extract DirectPollMonitor into a local folder of your choice
- 3. Open a Command Prompt on that folder
- 4. Launch the DirectPollMonitor from command line using as a parameter the URL of the DirectPoll result page
- 5. Start the DirectPoll and invite the audience to vote
- 6. Change the keyboard focus to the Scratch project
In order to make sure that all keypress events are properly received by the Scratch project, it is recommended that the window in which the Scratch project executes keeps the keyboard focus for the entire duration of the poll. Hence, it is better to control the poll from a different computer, while leaving in background the Command Prompt Terminal in which DirectPollMonitor executes.
A standard poll has been created for testing purposes. It has only 5 options associated with keys A, B, C, D, and E. Hence, it can be used to control any Scratch project designed to react to these keypress events.
Provide this link to the audience: http://etc.ch/SAA2
Pass this URL to DirectPollMonitor: http://directpoll.com/r?XDbzPBd3ixYqg8WPz06HavXHDMrW9iAfEQDf3Tuc2U
Use this simple Scratch project reacting to keys A, B, and C to test the remote control: https://scratch.mit.edu/projects/109658618/ (the name of the project has been typed by the audience…).
DirectPollMonitor was tested for the first time on ScratchDay 2016 during a public webinar attended by many Italian School teachers with their pupils. Several Scratch projects were developed during the webinar and controlled in real time by more than 100 people. Here is the video log.
Sources files to be published on GitHub.