Feel free to correct me in the comments, but I'm seeing two main trends in the gamification of health. The first is using game mechanics for fitness, motivating us to get us off the couch. The second is gamified, or at least game-based, treatments.
Since I'm and educator and not a health professional, I'm not particularly qualified to comment on the latter. However I have been reading many interesting articles about video games for pain reduction or for treating ADHD, and I'm very interested in devices that help us measure ourselves. For example, check out this story about using an inexpensive EEG device together with video games as therapy for ADHD.
Of broader application, though, is the use of game mechanics to help reverse our sedentary patterns. Devices such as the FitBit products, and games such as Nike+ Kinect Training help us to measure ourselves and set goals. As I write this during a weekend of overeating, I realize that these things need to be as "frictionless" as possible. It's much easier to have another slice of pie than to go to the gym, or to turn on the Xbox and spend half an hour working out. There continues to be a lot of thought put into seamlessly incorporating fitness (and motivation) into our daily lives.
Often the best motivation, for fitness or anything else, involves collaboration or competition with other people. Upcoming competitions such as triathlons or games encourage us to train, and collaborations such the November Project motivate us because our friends are doing it. Of course this means that we need to convince our friends to participate.
In education, however, we have a unique environment with a captive audience. Students participate in events such as the Terry Fox Run, as well as school sports and intramurals. Some organizations try to replicate this with Corporate Challenges, or with online gamification systems such as OfficeVibe, but for some reason those don't seem as successful. Maybe because we don't usually have PhysEd teachers working in our offices.
So there are two things that I'm thinking about related to this. First, of course, is how to continue use our time with students to encourage lifelong fitness. The second, though, is how to replicate for adults the fitness motivation that we see in schools. I see the principles of gamification as one of the best ways to continue doing that.
But first I think I'll go have another slice of pie.
Monday, October 14, 2013
Thursday, September 19, 2013
Empowered by Technology
The reason that I like technology so much is that it's empowering. The Internet, programming, and even video games allow us to do things that would be otherwise impossible. These technologies also give us a very real sense of power and control over our lives.
The Internet is the greatest repository of information, and misinformation, ever created. You can learn how to do things, share your own expertise, and even look up obscure facts. Scientia potentia est.
Programming is another way that technology empowers us. Basic services such as "If This Then That" (ifttt.com) and more advanced programming languages such as Python allow us to make these machines do our bidding. We can turn our ideas into reality.
Video games are, for many, much more than entertainment. They are empowering in that they allow us control over our own stories and our virtual worlds. They make possible things that are otherwise impossible or impractical, such as driving really fast, flying, or building worlds for others to experience. Minecraft is a great example.
Of course we also need to consider the negative impacts that technology is having on our society and on ourselves. TLDR.
The Internet is the greatest repository of information, and misinformation, ever created. You can learn how to do things, share your own expertise, and even look up obscure facts. Scientia potentia est.
Programming is another way that technology empowers us. Basic services such as "If This Then That" (ifttt.com) and more advanced programming languages such as Python allow us to make these machines do our bidding. We can turn our ideas into reality.
Video games are, for many, much more than entertainment. They are empowering in that they allow us control over our own stories and our virtual worlds. They make possible things that are otherwise impossible or impractical, such as driving really fast, flying, or building worlds for others to experience. Minecraft is a great example.
Of course we also need to consider the negative impacts that technology is having on our society and on ourselves. TLDR.
Saturday, June 1, 2013
Google Apps Bulk Delete Users Script
Google Apps has a bulk account creation tool, but nothing for bulk deleting accounts. I had previously written something in Python to bulk delete accounts from a text file, but it was time to create something web-based. This will only work if you have the Domain API enabled, which means that you'll have to enable it in your Google Apps for Education Admin console.
Just a note, though, before deleting users you may want to direct them to the Data Liberation tools for downloading their data.
The actual script is in Google Apps Script. You can see it by visiting Google Apps Delete Users, or create your own copy at script.google.com using the source code below.
Let me know if this works for you, or if you have suggestions for improvements.
Just a note, though, before deleting users you may want to direct them to the Data Liberation tools for downloading their data.
The actual script is in Google Apps Script. You can see it by visiting Google Apps Delete Users, or create your own copy at script.google.com using the source code below.
Let me know if this works for you, or if you have suggestions for improvements.
function doGet() {
// get the user's credentials for their Google Apps account
var user = Session.getEffectiveUser().getUserLoginId()
var domain = UserManager.getDomain();
var welcome = "You are running this script as " + user + " on the domain " + domain;
// set up the user interface
var app = UiApp.createApplication().setTitle('Delete Google Apps Users by MisterHay');
app.add(app.createLabel(welcome));
app.add(app.createHTML("<br>Make sure you have enabled the Provisioning API (support.google.com/a/bin/answer.py?hl=en&answer=60757).<br>This script will delete Google Apps user accounts that you paste or type below. Each account name must be on its own line.<br>e.g.<br>misterhay<br>mpython<br>unladen.swallow<p>"));
var textArea = app.createTextArea().setName("textArea").setSize("20%", "60%").setStyleAttribute("background", "white").setStyleAttribute("color", "black").setFocus(true);
var serverHandler = app.createServerHandler("deleteAccounts").addCallbackElement(textArea);
var clientHandler = app.createClientHandler().forEventSource().setEnabled(false).setText("deleting accounts...");
app.add(textArea);
var button = app.createButton("Delete Accounts");
button.addClickHandler(serverHandler);
button.addClickHandler(clientHandler);
app.add(button);
app.add(app.createLabel("no accounts deleted").setId("finishedLabel").setVisible(false));
return app;
}
function deleteAccounts(eventInfo) {
var app = UiApp.createApplication();
var deleteThese = eventInfo.parameter.textArea;
var stringArray = deleteThese.split(/\n/);
for (var loopNumber = 0; loopNumber < stringArray.length; loopNumber++) {
var deleteThisUser = stringArray[loopNumber];
// rename the accounts before we delete them to avoid the five day wait before account names can be reused
var renamedUser = deleteThisUser + '_old';
Logger.log(renamedUser);
// delete the account
UserManager.getUser(deleteThisUser).setUsername(renamedUser);
UserManager.getUser(renamedUser).deleteUser();
}
// tell the user how many accounts we deleted.
app.getElementById("finishedLabel").setText(loopNumber + " accounts deleted").setVisible(true);
return app;
}
Monday, May 27, 2013
Playing a YouTube Playlist in your DigitalSignage
If you're using DigitalSignage.com you'd probably like to play some videos on the screens. You can, of course, upload them to the Resources section, but if you'd just like to loop a YouTube playlist that's fairly easy.
First you'll need to find the URL for a YouTube playlist. Click the title of the playlist, then click the Share button. The URL will be something like http://www.youtube.com/playlist?list=PL627F181E0CB37E19 and the important part is the characters after the = sign.
I'm assuming that you know how to set up screen divisions and campaigns, so grab an HTML5 component from the toolbox and drop it in place. The URL you will put in that component will look like this http://www.youtube.com/embed?listType=playlist&autoplay=1&loop=1&list=PL627F181E0CB37E19 where autoplay=1 means that it will automatically play the through the playlist, and loop=1 means that it will go back to the beginning once it finishes. Of course you will replace the characters after list= with the playlist that you want to use.
First you'll need to find the URL for a YouTube playlist. Click the title of the playlist, then click the Share button. The URL will be something like http://www.youtube.com/playlist?list=PL627F181E0CB37E19 and the important part is the characters after the = sign.
I'm assuming that you know how to set up screen divisions and campaigns, so grab an HTML5 component from the toolbox and drop it in place. The URL you will put in that component will look like this http://www.youtube.com/embed?listType=playlist&autoplay=1&loop=1&list=PL627F181E0CB37E19 where autoplay=1 means that it will automatically play the through the playlist, and loop=1 means that it will go back to the beginning once it finishes. Of course you will replace the characters after list= with the playlist that you want to use.
Saturday, May 18, 2013
Playing Songza on an EeePC 701
This old seven-inch laptop is still useful for a few things, I've recently connected it to my stereo system as a Songza player.
There were two things I needed to do to get this working:
Install Lubuntu
Install Adobe Flash Player from the tar.gz (which involved copying the .so file to /usr/lib/Chromium and copying the folder somewhere else)
I can write up more details if you ask in the comments.
I tried Google Chrome, but it was too resource-intensive so the audio stuttered. I wasn't able to install the Flash plugin in Midori for some reason, so I went back to Chromium and got it working there. The next step will be to connect a USB IR remote receiver with some scripts for selecting different Songza playlists, pausing, and adjusting the volume.
There were two things I needed to do to get this working:
Install Lubuntu
Install Adobe Flash Player from the tar.gz (which involved copying the .so file to /usr/lib/Chromium and copying the folder somewhere else)
I can write up more details if you ask in the comments.
I tried Google Chrome, but it was too resource-intensive so the audio stuttered. I wasn't able to install the Flash plugin in Midori for some reason, so I went back to Chromium and got it working there. The next step will be to connect a USB IR remote receiver with some scripts for selecting different Songza playlists, pausing, and adjusting the volume.
Wednesday, May 15, 2013
form data averages Google Apps Script
When a Google Form is submitted, it adds a row to your spreadsheet. This changes your formulas, which is a problem if you are trying to do live calculations on submitted data, so you need a script to copy in the correct formulas after each form submission.
Here's an example of how I did that. The script is set to trigger whenever a form is submitted.
function insertAverage() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
var formulas = [
["=AVERAGE(C3:C100)", "=AVERAGE(D3:D100)", "=AVERAGE(E3:E100)"]
];
var destination = sheet.getRange("C2:E2");
destination.setFormulas(formulas);
};
Monday, May 6, 2013
Programming with Pure Data and Open Sound Control for the Behringer X32
Pure Data is an easy graphical programming environment. It can speak the OSC (Open Sound Control) protocol, so you can write programs to communicate with Behringer X32 digital mixers using their published X32 OSC Remote Protocol. Don't worry, it's easier than it sounds.
1. Download Pure Data Extended (which includes things that we'll need).
2. Unzip and/or install it.
3. Run the program Pd-extended.
4. If you're using Windows, it will likely ask you if you want to allow it to communicate on the network. Click Allow access and input your Administrator password if necessary.
5. In the window that pops up, choose New under the File menu.
6. You now have a blank canvas to put commands, controls, and such on to.
7. Under the Put menu choose Object (or hold the Ctrl key and press 1).
8. In the newly-created object type import mrpeach to tell it that you need to use that package.
9. Under the Put menu choose Message and type in it connect x.x.x.x 10023 but replace the x values with the IP address of your X32 mixer. For testing purposes you can have it connect to localhost (the computer that you're sitting at) instead.
10. Create a disconnect message and a udpsend object as well.
11. Drag from the bottom left corner of each of those messages to the top left corner of the udpsend object in order to connect their outputs to the udpsend input.
12. Now everything is set up to communicate, but we need to actually compose some messages to send. To start let's set up a fader to control a channel level, and a button (toggle) to control the mute for that channel. Under the Put menu choose Vslider to place a vertical slider and Toggle to place your mute button.
13. Put messages for sending mute on/off and fader levels for a particular channel following the X32 OSC specifications. For example, send /ch/01/mix/on $1 will take the input value ($1) to send the message /ch/01/mix/on 0 to mute channel one or /ch/01/mix/on 1 to unmute it.
14. You'll also need to put in a packOSC object to create the OSC messages, and connect its output to the udpsend object.
15. One last thing you'll need to do is change the Vslider's properties to output values from 0 to 1 as the X32 expects. Right-click the Vslider, choose Properties and change the top value to 1 instead of 127. You can also change the size and color here if you'd like.
16. Your program is now all set up. To run it, go to the Edit menu and choose Edit Mode (to turn off the edit mode) or hold the Ctrl key and press the e key. Once the program is running, click on one of your connect messages to connect to the X32, then drag the slider and click the toggle to see their effects.
Optional: If you'd like to test without connecting to the X32, create another Pure Data program by choosing New under the File menu and make it look something like the following. Remember that the Vslider range should be 0 to 1.
When your new OSC receiving program is running (not in edit mode), you should be able to click connect localhost 10023 in your original program and then see that the slider and toggle there will affect the corresponding ones in your new program.
Hopefully that's enough to get your started in writing Pure Data programs for you X32 digital mixer.
2. Unzip and/or install it.
3. Run the program Pd-extended.
4. If you're using Windows, it will likely ask you if you want to allow it to communicate on the network. Click Allow access and input your Administrator password if necessary.
5. In the window that pops up, choose New under the File menu.
6. You now have a blank canvas to put commands, controls, and such on to.
7. Under the Put menu choose Object (or hold the Ctrl key and press 1).
8. In the newly-created object type import mrpeach to tell it that you need to use that package.
9. Under the Put menu choose Message and type in it connect x.x.x.x 10023 but replace the x values with the IP address of your X32 mixer. For testing purposes you can have it connect to localhost (the computer that you're sitting at) instead.
10. Create a disconnect message and a udpsend object as well.
11. Drag from the bottom left corner of each of those messages to the top left corner of the udpsend object in order to connect their outputs to the udpsend input.
12. Now everything is set up to communicate, but we need to actually compose some messages to send. To start let's set up a fader to control a channel level, and a button (toggle) to control the mute for that channel. Under the Put menu choose Vslider to place a vertical slider and Toggle to place your mute button.
13. Put messages for sending mute on/off and fader levels for a particular channel following the X32 OSC specifications. For example, send /ch/01/mix/on $1 will take the input value ($1) to send the message /ch/01/mix/on 0 to mute channel one or /ch/01/mix/on 1 to unmute it.
14. You'll also need to put in a packOSC object to create the OSC messages, and connect its output to the udpsend object.
15. One last thing you'll need to do is change the Vslider's properties to output values from 0 to 1 as the X32 expects. Right-click the Vslider, choose Properties and change the top value to 1 instead of 127. You can also change the size and color here if you'd like.
16. Your program is now all set up. To run it, go to the Edit menu and choose Edit Mode (to turn off the edit mode) or hold the Ctrl key and press the e key. Once the program is running, click on one of your connect messages to connect to the X32, then drag the slider and click the toggle to see their effects.
Optional: If you'd like to test without connecting to the X32, create another Pure Data program by choosing New under the File menu and make it look something like the following. Remember that the Vslider range should be 0 to 1.
When your new OSC receiving program is running (not in edit mode), you should be able to click connect localhost 10023 in your original program and then see that the slider and toggle there will affect the corresponding ones in your new program.
Hopefully that's enough to get your started in writing Pure Data programs for you X32 digital mixer.
Subscribe to:
Posts (Atom)


_pd_2013-05-06_10-19-11.png)
_pd_2013-05-06_10-23-31.png)
_pd_2013-05-06_10-28-55.png)
_pd_2013-05-06_10-35-10.png)
_pd_2013-05-06_10-40-52.png)
_pd_2013-05-06_10-44-06.png)

