Use this tag for physically moving systems. For example robots, or electronic or pneumatic actuators.
Questions tagged [motion]
584 questions
39
votes
6 answers
How to detect movement of an android device?
I need suggestion about how to detect the amount of movement of an android device. Suppose I have put the phone on a table or bed and then if somebody taps the table or sits or laydown on the bed then I want to detect the movement of the android…

Surjya Narayana Padhi
- 7,741
- 25
- 81
- 130
36
votes
18 answers
Error importing Framer Motion v5 in React (with create-react-app)
When am trying to do simple animation for div using framer motion. Am getting this following error in browser
/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
Can't import the named export 'Children' from non EcmaScript…

Vicky
- 401
- 1
- 5
- 11
22
votes
4 answers
Raspberry Pi- GPIO Events in Python
I am using the GPIO pins on my Raspberry Pi with a PIR sensor to detect motion. When the sensor detects motion I want to then move the software onto other functions.
At the moment, to detect motion I have my program constantly running in a loop…

Stefoth
- 261
- 1
- 2
- 4
19
votes
3 answers
MotionEvent GetY() and getX() return incorrect values
I have following situation:
I have a custom ListView with ImageView and TextView in a row.
The ImageView has an onTouchListener, wchich invokes my onTouch method. Here are some lines from it:
if (event.getAction()==MotionEvent.ACTION_MOVE) {
…

glodos
- 1,203
- 3
- 13
- 21
18
votes
2 answers
R: Maps with Time Slider?
Is there a way to implement a time slider for Leaflet or any other interactive map library in R? I have data arranged in a time series, and would like to integrate that into a "motion" map where the plot points change dynamically over time.
I was…

Riley Hun
- 2,541
- 5
- 31
- 77
17
votes
2 answers
How to delete from the cursor to the end of a parenthetical expression in Vim?
Say I have this line of text in Vim:
(foo bar (baz) qux)
^
and my cursor is on the space between the words foo and bar, as indicated. I often find that, in situations like this, I want to delete the entire right-hand side of the outer…

adrian
- 1,447
- 15
- 24
16
votes
1 answer
How can you track motion using the iPhone's camera?
I saw that someone has made an app that tracks your feet using the camera, so that you can kick a virtual football on your iPhone screen.
How could you do something like this? Does anyone know of any code examples or other information about using…

Burf2000
- 5,001
- 14
- 58
- 117
15
votes
2 answers
What's the difference between ACTION_CANCEL and ACTION_UP in MotionEvent?
I want to track a finger touch on the screen. So what I did was to start recording the position when MotionEvent triggers ACTION_DOWN, but how do I know when the action is finished, at ACTION_CANCEL, or ACTION_UP?
What's the exact difference between…

James
- 5,119
- 5
- 25
- 27
14
votes
2 answers
motionBegan: Not Working
I am running into a bit of a problem when I attempt to use (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event in order to capture a shake event. The problem is that the function isn't even running, even when I override…

individualtermite
- 3,615
- 16
- 49
- 78
13
votes
3 answers
Android - camera as motion detector
How to implement a simple motion detector using the front camera and Android SDK?
An example scenario would be like this: a device is standing on a stand and plays a movie. If a person appears in front of it, without even touching it - it changes…

Yar
- 4,543
- 2
- 35
- 42
13
votes
5 answers
How to change scroll behavior (e.g. speed, acceleration) on website?
How are the modified scroll behaviors on websites made? I want to accomplish an accelerated scroll behavior as you can see it in the example. So you scroll in a certain speed and after you let go the page scrolls a little more by its own, slows down…

jeyy
- 159
- 1
- 1
- 5
13
votes
4 answers
iOS Motion Detection: Motion Detection Sensitivity Levels
I have a simple question. I'm trying to detect when a user shakes the iPhone. I have the standard code in place to detect the motion and this works no problem. However, in testing this on my actual phone, I've realized that you have to shake the…

zic10
- 2,310
- 5
- 30
- 55
13
votes
2 answers
Camera motion from corresponding images
I'm trying to calculate a new camera position based on the motion of corresponding images.
the images conform to the pinhole camera model.
As a matter of fact, I don't get useful results, so I try to describe my procedure and hope that somebody can…

pichsenmeister
- 2,132
- 4
- 18
- 34
11
votes
2 answers
Accelerometer to relative position
Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following:
In order to get relative position of the iPhone, one needs to
Set the accelerometer read rate
Noise filter the accelerometer response
Convert it to a…

Adam Davis
- 91,931
- 60
- 264
- 330
10
votes
1 answer
If the button is ACTION_DOWN, can it be forcibly held down for 1 second?
Holds the current button (ACTION_DOWN) to get the current time when pressed. When I release the button (ACTION_UP), the current time is also taken, and the audio file is cut and pasted by the time difference. If the user presses and releases a…

Junburg
- 350
- 5
- 23