Dear all
I am working on a project of air mouse accelerator using
1- Accelerometer board EB068-00-1
2- Two E-Blocks ZigBee endpoint and coordinator to send and receive accelerometer coordinates X and y
3- Base satiation with ECIO 40 connected to computer
4- Multiprogramming kit
Here I attached the flowcode files of the project where the project don’t work and the mouse cursor dos not move but by using two potentiometer instead of accelerometer board the project work well
If anyone have an experience how adjusting the configurations of zigbee with accelerometer I will be happy
thanks
air mouse Accelerometer
Moderator: Benj
- misoct
- Posts: 64
- Joined: Sat Sep 04, 2010 11:03 pm
- Location: Egypt
- Has thanked: 8 times
- Been thanked: 17 times
air mouse Accelerometer
- Attachments
-
- end.deviceaccl.fcf
- (9.5 KiB) Downloaded 309 times
-
- USB_mouse(xy)16-12.fcf
- (12.5 KiB) Downloaded 310 times
Last edited by misoct on Tue Dec 20, 2011 2:37 pm, edited 1 time in total.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: air mouse accelerator
Hello Misoct,
Have you gotten anything out of the accelerometer module? Eg are you able to print the readings from the module to a LCD?
Have you gotten anything out of the accelerometer module? Eg are you able to print the readings from the module to a LCD?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- misoct
- Posts: 64
- Joined: Sat Sep 04, 2010 11:03 pm
- Location: Egypt
- Has thanked: 8 times
- Been thanked: 17 times
Re: air mouse accelerator
Hello Benj
yes I tested the accelerometer by using the test file and I print on LCD xyz cordinates
thanks
yes I tested the accelerometer by using the test file and I print on LCD xyz cordinates
thanks
- Attachments
-
- AccelTest.fcf
- (7.5 KiB) Downloaded 312 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: air mouse Accelerometer
Great ok at least the sensor is working well. I will have a look at your program when I get 5 mins.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 45
- Joined: Mon Nov 07, 2011 6:36 pm
- Has thanked: 1 time
- Been thanked: 30 times
Re: air mouse Accelerometer
Hi
Just been looking at your program, had a bit of trouble as I don’t have EB068-00-1or its components. But looking at the pdf the output from this sensor will be an integer (+-512) but you seem to be using a byte to hold the value and the Zigbee is using this byte.
So you will need to change the x and y variables from byte to integer and then split these into two and have two sends per axis.
Or the other option is to add 512 to each axis (still need to be integers) divide the answer by 4 and then storing the answer in a byte variable, this would mean that you would have to use just one send per axis. With this method an output off 0 will be -1g and 255 will be 1g and 127 will be zero.
Both of these options will require you to make changes to your receiver program.
I think that this is your problem , so hopefully it will point you in the right direction.
I have just completed a program to use an accelerometer, as an air mouse or joystick which you can find here http://www.matrixmultimedia.com/mmforum ... =29&t=9965
regards
Gary
Just been looking at your program, had a bit of trouble as I don’t have EB068-00-1or its components. But looking at the pdf the output from this sensor will be an integer (+-512) but you seem to be using a byte to hold the value and the Zigbee is using this byte.
So you will need to change the x and y variables from byte to integer and then split these into two and have two sends per axis.
Or the other option is to add 512 to each axis (still need to be integers) divide the answer by 4 and then storing the answer in a byte variable, this would mean that you would have to use just one send per axis. With this method an output off 0 will be -1g and 255 will be 1g and 127 will be zero.
Both of these options will require you to make changes to your receiver program.
I think that this is your problem , so hopefully it will point you in the right direction.
I have just completed a program to use an accelerometer, as an air mouse or joystick which you can find here http://www.matrixmultimedia.com/mmforum ... =29&t=9965
regards
Gary
- misoct
- Posts: 64
- Joined: Sat Sep 04, 2010 11:03 pm
- Location: Egypt
- Has thanked: 8 times
- Been thanked: 17 times
Re: air mouse Accelerometer
Hi gary
Thank you for your valuable tips that helped me a lot to run the program well, and there are some problems I will work to resolve them
I would like to know Is it possible to usehttp://www.parallax.com/Portals/0/Downl ... l-v1.1.pdfusing your program, which modification on the program achieve that
Again I thank you
And happy Christmas
Thank you for your valuable tips that helped me a lot to run the program well, and there are some problems I will work to resolve them
I would like to know Is it possible to usehttp://www.parallax.com/Portals/0/Downl ... l-v1.1.pdfusing your program, which modification on the program achieve that
Again I thank you
And happy Christmas
-
- Posts: 45
- Joined: Mon Nov 07, 2011 6:36 pm
- Has thanked: 1 time
- Been thanked: 30 times
Re: air mouse Accelerometer
Hi
Looking at the manufactures datasheet http://www.parallax.com/Portals/0/Downl ... tation.pdf , there are a few of differences.
Gary
Looking at the manufactures datasheet http://www.parallax.com/Portals/0/Downl ... tation.pdf , there are a few of differences.
- You have a choice of either one byte or two bytes (10bits of data) per channel and these come from different registers. $06,$07,$08 for 8bits and $01 to $06 for 10bits.
And for setup and start measuring only one registers needs to be written to, $16
Plus the device address is different ($1D).
When the device has finished measurement then the DRDY pin goes high.
Gary