Go to Post I believe in the rookie teams. - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-03-2010, 12:26
eedo369 eedo369 is offline
Registered User
FRC #3088 (Kill-O-Bites)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Israel
Posts: 8
eedo369 is an unknown quantity at this point
How to read Cypress values properly?

Hello everyone,

I recently started to mess around with the Cypress and I have a few quesions:

The axes of the accelerometer return "weird" values. How do I read them properly? For example, what value will I get for tilting it horizontally?

The touch proximity value seems to work only when the antena supplied in the kit is connected. Is there a way to make it work without it?
Also, how do I read its values properly?

I read that some of the connectors on the cypress board can be used as PWMs. How can I configure it that way in the program and on the board?

In Labview, there is a VI that allows me to set the mode of each digital channel (Set Enhanced Digital Config VI). However, I noticed you can do the same when you click the "configure" button in the I/O tab on the Driver Station.
Is there a difference whether I change it in the program or on the DS? Are they synced?

Thanks!
  #2   Spotlight this post!  
Unread 24-03-2010, 22:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: How to read Cypress values properly?

I posted a few answers marked with ***s.

The axes of the accelerometer return "weird" values. How do I read them properly? For example, what value will I get for tilting it horizontally?

*** It may be easiest to look at the enhanced I/O page and tilt the board back and forth to note which is X, which is Y, which is positive and which is negative.

The touch proximity value seems to work only when the antena supplied in the kit is connected. Is there a way to make it work without it?
Also, how do I read its values properly?

*** I assume you could wire it to an isolated rivet or screw head. Honestly, it didn't seem to work that well, so I don't know it is worth it.

I read that some of the connectors on the cypress board can be used as PWMs. How can I configure it that way in the program and on the board?

*** You configure the period using either the configuration VI or the configuration dialog. You set the PWM ratio using the Enhanced I/O VI specifically for this value. Honestly, I'm not sure what you would normally use the PWM generation for on a driver station, but the HW does it, so there it is.

In Labview, there is a VI that allows me to set the mode of each digital channel (Set Enhanced Digital Config VI). However, I noticed you can do the same when you click the "configure" button in the I/O tab on the Driver Station.
Is there a difference whether I change it in the program or on the DS? Are they synced?

*** The config page is the initial config settings, and most likely all you'll need. On the other hand, it seemed useful to allow the robot control the configuration. This would allow easier swapping of the DS.

Greg McKaskle
  #3   Spotlight this post!  
Unread 25-03-2010, 08:57
eedo369 eedo369 is offline
Registered User
FRC #3088 (Kill-O-Bites)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Israel
Posts: 8
eedo369 is an unknown quantity at this point
Re: How to read Cypress values properly?

Quote:
Originally Posted by Greg McKaskle View Post
I posted a few answers marked with ***s.

The axes of the accelerometer return "weird" values. How do I read them properly? For example, what value will I get for tilting it horizontally?

*** It may be easiest to look at the enhanced I/O page and tilt the board back and forth to note which is X, which is Y, which is positive and which is negative.

The touch proximity value seems to work only when the antena supplied in the kit is connected. Is there a way to make it work without it?
Also, how do I read its values properly?

*** I assume you could wire it to an isolated rivet or screw head. Honestly, it didn't seem to work that well, so I don't know it is worth it.

I read that some of the connectors on the cypress board can be used as PWMs. How can I configure it that way in the program and on the board?

*** You configure the period using either the configuration VI or the configuration dialog. You set the PWM ratio using the Enhanced I/O VI specifically for this value. Honestly, I'm not sure what you would normally use the PWM generation for on a driver station, but the HW does it, so there it is.

In Labview, there is a VI that allows me to set the mode of each digital channel (Set Enhanced Digital Config VI). However, I noticed you can do the same when you click the "configure" button in the I/O tab on the Driver Station.
Is there a difference whether I change it in the program or on the DS? Are they synced?

*** The config page is the initial config settings, and most likely all you'll need. On the other hand, it seemed useful to allow the robot control the configuration. This would allow easier swapping of the DS.

Greg McKaskle
Thanks for all the info. Just one more question- I understand how to get values from the accelerometer, but I don't understand how to translate them to its movement.

Say, if I want to write a program that starts an engine everytime the cypress is being tilted horizontally, and maybe control its speed according to it, what parameters should I enter?
  #4   Spotlight this post!  
Unread 25-03-2010, 09:32
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: How to read Cypress values properly?

Do you want to detect rotation or translation? If you want to slide the box to one side, just look for a change from a predefined center point. If you want to twist the box, it is more complex. Since an accelerometer is not a gyro, it does not detect rotation. There are two ways to handle this: You could move it in an arc (and detect the sideways motion) or try to determine which direction is down by seeing how gravity is affecting each axis. Or, you could get a 3.3v gyro and integrate it in software (you cannot use the WPI Gyro code for this).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #5   Spotlight this post!  
Unread 25-03-2010, 23:52
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: How to read Cypress values properly?

Quote:
Originally Posted by eedo369 View Post
Thanks for all the info. Just one more question- I understand how to get values from the accelerometer, but I don't understand how to translate them to its movement.

Say, if I want to write a program that starts an engine everytime the cypress is being tilted horizontally, and maybe control its speed according to it, what parameters should I enter?
The accelerometer is mostly just useful for measuring gravity. If you are using two axes, you can use the atan to find the angle of the board. That or just use the two axes that are parallel with the ground.

-Joe
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to properly connect and program servo camper365 NI LabVIEW 3 27-01-2010 16:21
Servo Values to Degrees... How? mogunus Programming 16 11-04-2007 02:03
How to set up and run a FF League properly. Alex Cormier Fantasy FIRST 4 27-02-2006 17:18
Chain..... How you do it properly? JasJ002 Inventor 12 03-06-2005 08:49
How to make gears mesh properly. sanddrag Technical Discussion 7 13-01-2004 20:19


All times are GMT -5. The time now is 23:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi