Hi, after one busy week I managed to release this first simple demo that shows you how to use the n95 accelerometer as an input device in Blender :D The application is structured in this way:

  • Mobile client, a python script which reads the accelerometer data and sends it via bluetooth to the pc
  • A server that runs on your pc and shares the data with the BGE through a local UDP non-blocking socket
  • A Blender script which handles the cube rotation in the BGE using the n95 accelerometer’s data

Why did I use a local socket? Sometimes I experienced some lag using pyserial in Blender, so to avoid that my idea was to use a non blocking socket. With this approach I had a smooth game running in Blender without any lag.

What do you need to run this? A Nokia N95, a PC/Laptop with a BT connection and Blender of course! :D You need to install PyS60 on your Nokia phone from here. Download both PythonForS60_1_4_5_3rdEd.sis and PythonScriptShell_1_4_5_3rdEd_unsigned_testrange.SIS you need to sign the ScriptShell otherwise the accelerometer data won’t be retrieved by the script due to security reasons of Nokia phones. You can sign it from https://www.symbiansigned.com/app/page using “Open signed online”. I’m going to put the source code of what I did really soon, I want to improve a little bit some part of the code to make it more stable. However even though the scenario I present in this video is really simple, it’s a way to show you how Blender is really powerful (besides modeling, animating, composing, whatever :D ), Python is really one the strongest features that Blender has, since it makes the possibilities of interaction with other apps, device etc,  endless. :) Try for example to imagine the N95 as a joypad for a Blender game WipeOut style (I personally hate WipeOut, but somebody may love it :D ).

So enjoy the video and if you have feedbacks, questions, comments, feel free to ask!

Edit: sources available! Click here to download blender95!

Akta


Share →

One Response to N95 accelerometer with Blender

  1. Nate says:

    The download source link is dead. Can you fix it?
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>