The latest work from Society46 where the iPhones turns into a tool to paint together with other, in real time with the help of Hydna real-time server.
CO:CREATE from Society 46 on Vimeo.

The latest work from Society46 where the iPhones turns into a tool to paint together with other, in real time with the help of Hydna real-time server.
CO:CREATE from Society 46 on Vimeo.
How is it possible to detect the rotation of an iPhone that lies on a table like the compass but is showing a more accurate rotation? I tried to use the compass with the magnetic heading of the iPhone but it appears to be quite unreliable and jumps unexpectedly. The gyroscope can be used but the original reference point drifts with the gyroscope over time. This example combines the compass and the gyroscope using the compass as a reference as long as it is stable and using the fast update of the gyroscope between the times the compass is unstable.
In the app below there are 3 rotating graphics:
The application uses the CLLocationManager to access the magnetic heading of the compass and CMMotionManager to access the gyroscope. The values I use are newHeading.magneticHeading and motion.attitude.yaw. The magnetic heading gives a value of 360 degrees. The yaw value gives a value between -180 and 180.
First we initialize the location manager. This will only work on the device and not in the simulator.
As shown in the code above we delegate the listener to RotationViewController. The following code is needed to listen to updates for the compass:
Next step is to listen to updates from the gyroscope. We do that by listening to motionManager’s CMAttitude updates. We use the yaw which is retrieved in radians and we convert it to degrees.
[motionManager release];
}
[motionManagerstartDeviceMotionUpdatesToQueue:opQwithHandler:motionHandler];
We now have the compass and the gyroscope. In this example I wanted to offset the magnetic heading so it always points at a certain direction. I decide on that direction when I press the “Calibrate”-button I set my offset from the magnetic heading. updatedHeading is the latest magnetic heading I got from the locationManager. northOffset becomes my reference to where I want the gyroscope to always origin from.
Now that we have the northOffset we want to use it together with the gyroscope. Since the compass is jumping sometimes we want to only use the compass value when it is stable. A timer is created with the updater method that checks if the value of the magnetic heading has changed. The interval is called every other second. If the magnetic heading hasn’t changed from last time it is considered a stable value. The stable value is added to newCompassTarget which is use for the gyroscope to get a new reference.
newCompassTarget is used in the code below so that the gyroscope always strive to go to the new reference of the compass but with the offset we use in the variable offsetG which is the difference between where the gyroscope was with the old and compared to the new heading.
} else {
rotateImg.transform = CGAffineTransformMakeRotation(gyroDegrees);
}
};
Download project source code here.
Read more about the process on making The depressed shoe shelf.
Maria Paz is exploring the field of mood inputs by using your pulse as an input to control your environment. The sensor is sending out light that is reflected in the finger and back to the light sensitive sensor. As blood is pumping and flowing in the finger the amount of light received back alters. The output gives you the pulse of your body. Follow her progress in working on her final project Mood Tunnel on http://themoodtunnel.posterous.com/
Nintendo Wii introduced the Vitality sensor a few months ago, working as an input to measure your health and can be used in games.
LEDs translating human pulse from Maria Paz on Vimeo.
I am working on a project where I need to measure the humidity of the space. I want to know when the space has dried up and when it is wet or soaking wet. There are several different humidity sensors on the market but t does not absorb water but only measure the level of humidity around it. They are small and does not attract water. So I tried to build my own DIY version and my first attempt works quite well. Check it out:
Trying out the small Sharp GP2Y0D810Z0F IR sensor. It only detects when an object is 2 cm to 10 cm away. Great for detecting close up objects. The sensor is very sensitive so I added a resistor of 1 mega ohm to lighten up the power supply. There are 3 pins on the circuit board of the sensor: ground, power supply (2.7 V to 6.2 V) and analog output. More details on the sensor and circuit board on Pololu’s site who are the manufacturers of the circuit board. There is also another version of this sensor Sharp GP2Y0D805Z0F, detecting objects even closer with a range of 0.5 cm to 5 cm.

Serial monitor output
Time to do some interesting stuff with bending a sensor.

Flex sensor