Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does -1, 1, 2 mean? #7

Open
alchle opened this issue Aug 13, 2016 · 3 comments
Open

What does -1, 1, 2 mean? #7

alchle opened this issue Aug 13, 2016 · 3 comments

Comments

@alchle
Copy link

alchle commented Aug 13, 2016

Kristopher,

This looks very promising for me to detect mouse speed. I am working on a project for my wife who wants to have constant stitch length when sewing quilts. The faster she moves the quilt the longer the distance between stitches, and the slower she moves it the closer they are together. She wants equal distance no matter has fast she is moving the quilt. I figured out how to control the needle's stitch speed on the sewing machine with a digital potentiometer but need to transfer the speed at which she is moving the quilt to the arduino in order to control the needle speed (potentiometer).

What does the -1, 1, 2 mean in the output?
I've tried to calculate speed by sqrt(abs(x)_abs(x) + abs(y)_abs(y))
with x=data[1]
with y=data[2]

But the velocities are not matching how fast I am moving the mouse.

Any help would be appreciated. Thanks

-Allen

@kristopher
Copy link
Owner

Allen,

I haven't touched that lib since 2009 :/ but here are some resources that
maybe helpful

Good overview of how the ps2 mouse communication works http://www.computer-
engineering.org/ps2mouse/

My lib is used in this book for a couple projects
http://www.practicalarduino.com/projects/ps2-keyboard-or-mouse

Cheers,
Kris

On Sat, Aug 13, 2016 at 4:16 PM, alchle notifications@github.com wrote:

Kristopher,

This looks very promising for me to detect mouse speed. I am working on a
project for my wife who wants to have constant stitch length when sewing
quilts. The faster she moves the quilt the longer the distance between
stitches, and the slower she moves it the closer they are together. She
wants equal distance no matter has fast she is moving the quilt. I figured
out how to control the needle's stitch speed on the sewing machine with a
digital potentiometer but need to transfer the speed at which she is moving
the quilt to the arduino in order to control the needle speed
(potentiometer).

What does the -1, 1, 2 mean in the output?
I've tried to calculate speed by sqrt(abs(x)_abs(x) + abs(y)_abs(y))
with x=data[1]
with y=data[2]

But the velocities are not matching how fast I am moving the mouse.

Any help would be appreciated. Thanks

-Allen


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAROHdbAynzBrvP1xh9n1VKBBgD5uhbks5qfiYAgaJpZM4JjwGO
.

@kristopher
Copy link
Owner

I'd check out the PRs and Forks, I think there are some more recent updates
for newer versions of the Arduino SDK

On Sat, Aug 13, 2016 at 4:28 PM, Kristopher Chambers <
kristopher.chambers@gmail.com> wrote:

Allen,

I haven't touched that lib since 2009 :/ but here are some resources that
maybe helpful

Good overview of how the ps2 mouse communication works
http://www.computer-engineering.org/ps2mouse/

My lib is used in this book for a couple projects
http://www.practicalarduino.com/projects/ps2-keyboard-or-mouse

Cheers,
Kris

On Sat, Aug 13, 2016 at 4:16 PM, alchle notifications@github.com wrote:

Kristopher,

This looks very promising for me to detect mouse speed. I am working on a
project for my wife who wants to have constant stitch length when sewing
quilts. The faster she moves the quilt the longer the distance between
stitches, and the slower she moves it the closer they are together. She
wants equal distance no matter has fast she is moving the quilt. I figured
out how to control the needle's stitch speed on the sewing machine with a
digital potentiometer but need to transfer the speed at which she is moving
the quilt to the arduino in order to control the needle speed
(potentiometer).

What does the -1, 1, 2 mean in the output?
I've tried to calculate speed by sqrt(abs(x)_abs(x) + abs(y)_abs(y))
with x=data[1]
with y=data[2]

But the velocities are not matching how fast I am moving the mouse.

Any help would be appreciated. Thanks

-Allen


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAROHdbAynzBrvP1xh9n1VKBBgD5uhbks5qfiYAgaJpZM4JjwGO
.

@alchle
Copy link
Author

alchle commented Aug 13, 2016

Thank you Kris for the reply. I'll read through the articles and see what I an learn.

-Allen

On 8/13/2016 4:29 PM, Kris Chambers wrote:
Allen,

I haven't touched that lib since 2009 :/ but here are some resources that
maybe helpful

Good overview of how the ps2 mouse communication works http://www.computer-
engineering.org/ps2mouse/

My lib is used in this book for a couple projects
http://www.practicalarduino.com/projects/ps2-keyboard-or-mouse

Cheers,
Kris

On Sat, Aug 13, 2016 at 4:16 PM, alchle notifications@github.commailto:notifications@github.com wrote:

Kristopher,

This looks very promising for me to detect mouse speed. I am working on a
project for my wife who wants to have constant stitch length when sewing
quilts. The faster she moves the quilt the longer the distance between
stitches, and the slower she moves it the closer they are together. She
wants equal distance no matter has fast she is moving the quilt. I figured
out how to control the needle's stitch speed on the sewing machine with a
digital potentiometer but need to transfer the speed at which she is moving
the quilt to the arduino in order to control the needle speed
(potentiometer).

What does the -1, 1, 2 mean in the output?
I've tried to calculate speed by sqrt(abs(x)_abs(x) + abs(y)_abs(y))
with x=data[1]
with y=data[2]

But the velocities are not matching how fast I am moving the mouse.

Any help would be appreciated. Thanks

-Allen


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAROHdbAynzBrvP1xh9n1VKBBgD5uhbks5qfiYAgaJpZM4JjwGOhttps://github.com/notifications/unsubscribe-auth/AAAROHdbAynzBrvP1xh9n1VKBBgD5uhbks5qfiYAgaJpZM4JjwGO
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/7#issuecomment-239640011, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APyPI_5KDehmXZWAaHuPl2RBxksbtg__ks5qfikfgaJpZM4JjwGO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants