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?
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.
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?
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).
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.