For this task, I took inspiration from the Sleep Time
app, which tracks your sleep cycles and can wake you up while in your lightest sleep phase. It does this by using the accelerometer in your phone, to track how much you are moving while you sleep.
I decided to create an app that would let you draw while you were asleep, by reading an accelerometer in a similar way.
I toyed with getting an Apple developer license and using Xcode to read the accelerometer on an iPhone, or using an Arduino with an accelerometer, but in the end I decided upon using Processing
and a phone. I then learnt how to use Processing and to read an accelerometer by signing up for a Coursera course on Creative Programming for Digital Media & Mobile Apps
This is what the app does:
1. For periods where you are not moving much, the app will draw a circle. The bigger the circle, the longer the amount of time you were not moving much. You may have been sleeping quite deeply or were in REM sleep.
2. For periods where you are moving more, the app will draw a square. The bigger the square, the more you were moving. You may have been awake.
3. The screen is divided into 4 sections, each lasting 2 hours.
You can run the app yourself from here:
I've only tried it on an iPhone 4S, so can't guarantee it will work on other phones.
How to make it work on an iPhone 4S:
1. Go to Settings and in the General section, turn Auto-Lock to "Never".
2. Go to http://jodi.freeshell.org/sleepdrawing/index.html
3. Plug the phone in to charge.
4. Put the phone on your bed. (I put mine under my pillow.)
5. Press the screen, so the text goes away.
6. Leave the phone alone.
8. Wake up and touch the screen again.
9. The image that has been created will then open in a new tab in the web browser, so you can save it.
Note: Obviously just because you were not moving much doesn't mean you were definitely asleep, but you might have been asleep.
Make it delete the picture when you wake up, so the picture only exists when you're sleeping.
From 16th July:
From 21st July:
From 22nd July: