Topic: /dev/bend

The currently documented approach for getting bend data is to read a line from /dev/bend.  You should get something like this:

Sample python code:

>>> f = open('/dev/bend')
>>> f.readline()
'ravg: 0B05 | bent: 0 | logtot: 002B0F1D | latest 0B08\n'
>>> f.close()

Unfortunately /dev/bend is locked for reading by the flash processing running the widgets.  if you kill this process you can access /dev/bend.  This obviously isn't a solution because the flash process will be auto-restarted but now won't be able to access the bend sensor sad

Possible ideas:

1) The bend sensor should be able to be read only for multiple processes - I don't do this kind of systems dev under linux but I imagine in it is possible.
2) chumbyflashplayer shouldn't keep a handle open to /dev/bend so other processes can use it.
3) /proc/bend should be more useful smile

Re: /dev/bend

The best answer for this is to kill the flash player, and clear the flag that causes it to restart.

rm /tmp/flashplayer_started
killall chumbyflashplayer.x

The problem with sharing a driver that's connected to a physical device is that a process can miss a critical event that went to another process instead.