Developer, Evangelist, Coauthor, Educator, Gadget Geek Flash > 8 years Mobile & Devices >= 4 years Symbian, webOS, Android, iPhone = Core Targets Work with OEMS, partners ... those using Flash & related tech Scott Janousek
capacitance, with respect to acceleration. The accelerometer senses the capacitance change between a static condition and the dynamic state. Piezoelectric Accelerometers use materials such as crystals, which generate electric potential from an applied stress. This is known as the piezoelectric effect. As stress is applied, such as acceleration, an electrical charge is created. Piezoresistive Accelerometers (strain gauge accelerometers) work by measuring the electrical resistance of a material when mechanical stress is applied Hall Effect Accelerometers measure voltage variations stemming from a change in the magnetic field around the accelerometer. Magnetoresistive Accelerometers work by measuring changes in resistance due to a magnetic field. The structure and function is similar to a Hall Effect accelerometer except that instead of measuring voltage, the magnetoresistive accelerometer measures resistance. Heat transfer Accelerometers measure internal changes in heat transfer due to acceleration. A single heat source is centered in a substrate and suspended across a cavity. Thermoresistors are spaced equally on all four sides of the suspended heat source. Under zero acceleration the heat gradient will be symmetrical. Acceleration in any direction causes the heat gradient to become asymmetrical due to convection heat transfer. Future Accelerometer Advancements In the next decade, NANO technology will create new applications and dramatically reshape this area of technology. MEMS-Based Accelerometers MEMS (Micro-Electro Mechanical System) technology is based on a number of tools and methodologies, which are used to form small structures with dimensions in the micrometer scale (one millionth of a meter). This technology is now being utilized to manufacture state of the art MEMS-Based Accelerometers.
Nokia has millions of S60 (Symbian) devices on market Most SmartPhones from Nokia have accelerometers (e.g. N900, X-Series, Nokia N97, N96/95, 5800, 5500 Sport)
import com.nokia.lib.Service; //-- Create a new Service object which has Sensor data var sensors = new Service( "Service.Sensor", "ISensor" ); //-- Define input parameters for picking Rotation sensor var inParam = { SearchCriterion:"Rotation" }; //-- Define result value var outParams = sensors.FindSensorChannel( inParam );
var channelInfo = outParams.ReturnValue; //-- Define valid values for channel info var channelId = channelInfo[0].ChannelId; var contextType = channelInfo[0].ContextType; var quantity = channelInfo[0].Quantity; var channelType = channelInfo[0].ChannelType; var location = channelInfo[0].Location; var vendorId = channelInfo[0].VendorId; var dataItemSize = channelInfo[0].DataItemSize; var channelDataTypeId = channelInfo[0].ChannelDataTypeId; var channelInfo = { " ChannelId:channelId, ContextType:contextType, Quantity:quantity, " ChannelType:channelType, Location:location, VendorId:vendorId, " DataItemSize:dataItemSize, ChannelDataTypeId:channelDataTypeId }
for listening rotation channel data var inParams = { ListeningType:"ChannelData", ChannelInfoMap:channelInfo }; //-- The RegisterForNotification method registers the user to receive data from //-- one sensor channel asynchronously sensors.RegisterForNotification( inParams, callBack ); //-- Because this is an asynchronous method, you need to define the callback function //-- Callback function includes all the channel data function callBack( transactionID:String, eventID:String, outParam:Object ) { " if ( outParam.ErrorCode == 0 ) { " " var channelData = outParam.ReturnValue; " " var xRot = channelData.XRotation; " " var yRot = channelData.YRotation; " " var zRot = channelData.ZRotation; " } else { " " var errorId = outParam.ErrorCode; " } }
Accelerometer API Kuneri Lite = 3-rd Party “Extender” Kuneri Lite Accelerometer “Plug-in” http://wiki.kunerilite.net/index.php?title=Accelerometer_plugin
have Accelerometers Motion sensor in games, picture UI, & auto rotation “Shaker Feature” = task switching in music player, etc Can use J2ME and/or Flash to tap into accelerometer API
Lite //-- returns back X,Y,Z values from accelerometer sensor into //-- accX, accY, accZ variables (if supported on target device) loadVariables("accelerometer://data", _root ); Accessing Accelerometer via Flash Lite var sensorCheck_bool:Boolean = true; onEnterFrame = function { loadVariables("accelerometer://data", _root); if (sensorCheck_bool) { //-- only check sensor once! sensorCheck_bool = false; if (accX != undefined && accY != undefined && accZ != undefined) { //-- sensor is reporting, so continue } else { trace("No sensor is reporting! Is this a supported device?"); } } }
with Flash Lite 3 Includes ActionScript 2.0 Accelerometer Class you can reuse Source: http://www.adobe.com/devnet/devices/articles/chumby_development_06.html AdvancED Flash on Devices - Flash Lite and Flash 10 Chapter 7 - Mobile and Devices Widgets on the Flash Platform (pg 203) http://advancED.flashmobilebook.com/
Site http://developer.sonyericsson.com/ Forum Nokia http://wiki.forum.nokia.com/index.php/Sensor_API http://wiki.forum.nokia.com/index.php/CS001253_-_Displaying_sensor_data_in_Flash_Lite http://wiki.forum.nokia.com/index.php/ How_to_use_S60_Platform_Services_to_create_accelerometer_based_ user_interaction_with_Adobe_Flash_Lite
for MEMS components will grow from $460 million last year to over $1.6 billion in 2013. The company also expects technology such as gyroscopes and projectors to hit the market as early as 2010.