Reply
Thread Tools
Posts: 1 | Thanked: 38 times | Joined on Jul 2014
#1
Hey all,

I hope this is the right place to post this I've somehow managed to make my N900 detect movements (and their distances) by checking how the echo of a sound is altered with a Python script that's rather dirty than quick. The way It's recording and playing audio is more a hack than a proper solution, but for some reason it's working. It requires python-numpy and alsa-utils to be installed.

EDIT: It seems like Python is not always taking care of the two subprocesses this script is spawning. The right solution might be wrapping the whole thing in a try-catch-block and cleaning up yourself. I prefer the lazy solution: Starting it with "python echo.py; killall arecord; killall aplay;" If the subprocess module doesn't do it's job properly, killall can take care of it

EDIT2: As Vento suggested, I've added "Script" to the title.

Please tell me if there's a way to embed the video that I've missed. Just in case

Demo Video
The script on pastebin

Last edited by Encypruon; 2014-07-12 at 11:00.
 

The Following 38 Users Say Thank You to Encypruon For This Useful Post:
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#2
omg !

{10 characters}
 
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#3
Hahaha
Too frickin'-freakishly-coollio-weird man!
Welcome to the new-guy!
And you bring presents to the party!
A new toy!

Gotta come up with a cool name for it though...
sonar for n900 ...makes me think the n900 needs to be waterproofed for submersible diving.

Hmm...how's this for a name..."The Unsneakable App".."UnSneak-A-App"...or "Kato"

.thinkin 'bout the vid there...with you waving your hand behind it and all...tryin to sneak up on it so-to-speak ...
reminded me of Kato from the pink panther movies always trying to surprise attack Inspector Clouseau.

Hmm...what is the distance on the sucker? How far?
Can it be tweaked to say...cancel out your movements (very tricky that I would imagine) so you wouldn't get your own feedback ?...so to speak.

On a more humourous note...
Can it detect movement say...in another room?
Could it warn me to get under my mistresses bed before her husband comes in the door?

Better...could it warn me of a planet- invading alien's heavy-breathing while I hide in the closet? At least I'd die then with major points for dying and going out in better than Hollywood sci-fi movie style.

Hmmm very-way cool ....
hmmm... the applications...

Y'know ....it just reiterates yet again...
maemo ain't dead...
the n900 isn't anymore irrelevant than it was when it 1st came out...
Not to mention the frickin' way-cool factor of our devices and of the mad innovations of this community...
stuff stupidphones and their communities just don't have...

The "Other Guys" should be taking notes...want crazy-fast and wild innovations? Open their platforms up for the public to play with them...best and cheapest corporate method of r+d is to let everyone else pool their brain-pans and do it for them. You'd think they would have figured out that cost saving method by now.

Hats off to you man....that is...by far one of the most interesting and bizarre innovations...now how to integrate it with some ideas I got....
__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium

Last edited by endsormeans; 2014-07-11 at 16:06.
 

The Following 6 Users Say Thank You to endsormeans For This Useful Post:
ndhikaa's Avatar
Posts: 40 | Thanked: 48 times | Joined on Jul 2013 @ Pondokgede, Indonesia
#4
i gotta say thanks!
 
Posts: 445 | Thanked: 367 times | Joined on Nov 2010 @ Italy
#5
Amazing stuff!
__________________
Flickr photos taken with N900 https://www.flickr.com/cameras/nokia/n900/
"Closed source software tells you what you can do. With open source, you decide what software can do for you" Richard Stallman
 
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#6
well how a simple game or a fun app be put up with this as the input ? think of a ball to put in a hole without touching any sides of the screen or jush make it jump insanley a plugin for the photos app that can zoom in or a plugin for omp to forward rewind or play with the volume or any crazy idea that can be implemented
 

The Following User Says Thank You to nokiabot For This Useful Post:
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#7
mahgawd nokiabot...yeah..man...hell....just the tip of the iceberg ....of stuff that could be implemented with this...

hmm...kinda like the xbox kinect interface...that monitors visual input and implements a response in the running prog or game.
Better I think...this is crazy sensitive...and unlike the kinect...it isn't limited to direct line of camera sight...you could run an prog/ game/ music... whatever... with the n900 sitting on your desk/ nightstand/ bookshelf...possibly across the room ....BEHIND you..... for all it matters

hmmm...OP'er can you give a rough guesstimate as to the distance the sonar receives before the signal becomes ...umm..deterioratingly inadequate (for measurements to be applied to possible applications) ?

Roughly.... how many feet from device before sonar signal degeneration?

Oh my...oh yes....I most definitely could see direct applications

OP.....more possible applications are thrown around...the more I'm super-duper impressed
__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium

Last edited by endsormeans; 2014-07-11 at 18:36.
 

The Following User Says Thank You to endsormeans For This Useful Post:
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#8
humm it feels like it can detect movements two way it cannot sense direction lol but as the op says its quick and dirty it seems it can be taliored a bit to cerate some fun things or better a script or a app that can be used to intregate whatever one wants like we use shortcutd or camera half press to map any function
 

The Following User Says Thank You to nokiabot For This Useful Post:
Posts: 178 | Thanked: 91 times | Joined on May 2011 @ Mira (Venice) - Italy
#9


Btw, it will be nice an little UI app to know the distance of the nearest moving object. No fancy button or strange things... just a number in center of the screen. Okay maybe some settings would be useful like sample numbers... I'm thinking about a simple menu that popup when you press the number.

Last edited by Vento; 2014-07-11 at 19:54.
 

The Following User Says Thank You to Vento For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#10
Interesting, gotta check the accuracy. I wonder if it would more effectively underwater, for obvious reasons (after altering calculations, of course)? No pun, I mean waterproof bag and underwater-tailored receiver/emitter part connected to headphone socket.

Could become a cool part of RC submarine model, too

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 4 Users Say Thank You to Estel For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:49.