What is a Cypress?

Hello everyone,

I know this may sound a bit too late but I wanted to ask what exactly is the Cypress, what can I do with it and how does it work?

Well here in the south, a cypress is a tree that grows in the swamp. But I doubt that is what you mean.

It is an electronic board that came in your KOP, also called a PSoC. You can connect it to the USB port of your Classmate and configure what I/O options you want. Then then you can program your cRIO to can read analog and digital I/O from switches etc, connected to the Cypress

You can read more about it here.

There is a nice enclosure for the board which you can get here, if you would like a protective box and nice headers to wire to.

You can do cool things like put switches on it to tell the robot which zone it is starting in so it can use the right autonomous code…that is if there is time to program different autonomous :smiley:

You can do more than that - You can build a whole custom control box for your operator (although I recommend against using it for the driver, simply because the driver needs two joysticks or a gamepad to drive)

You can have joysticks on the PSoC since its got ADC capability. You just have to use joysticks similar to the ones included in the kit 2008 and earlier.

Thanks for all the info!

Can you tell me how to program it and and how to use Labview to program the CRIO to read it?

To program the PSoC: Plug it in to USB (no battery needed) and open PSoC programmer. Find the file called FRC_IO_v2.hex, located in Shared Documents on the Classmate. Upload the image.

On the other end - Go to WPI Robotics Library => Driver Station => Extended IO for the extended IO. This includes VI’s to read analog channels, digital channels, and write digital outputs, plus much more.

O.K. Let’s say that I want to use the Button on the Cypress to determine which autonomous I want to use right before the match starts.
How do I do that?

The problam is, I don’t know how to “connect” what I see in Labview to what I see on the board. And our electrician hasn’t got a clue on how to connect DIOs and PWMs etc to it.

For autonomous you can also use a few switches on the robot, connected to Digital Inputs. Or we use a rotary switch, with multiple resisters connected to an analog input on the robot.

To wire a few toggle switches on the control panel, we found it easier to take apart a joystick and parallel toggle switches to some of the push-buttons.

These are cool ideas, but I want to specifically use the Cypress because I want to understand how it works.
I’m the programmer of my team and I had almost no problams writing our code in Labview, including state machines, clusters, etc.

The problam is that as far as I can see, the Cypress requires both knowledge in programming and in electricity, and I can’t write any VI without knowing how to ‘read’ it properly and maximize its potential.

Once it is wired, its simple. Go to the FIRST control system documentation page and find a pinout of the Cypress IO board. Depending on what you want, you can use Compatibility or Enhanced IO. I used Enhanced, but Compatibility allows Virtual IO if you would rather have that. On your Classmate, you can configure if any digital input is pulled high, pulled low, floating, or out. You will want “pulled high” for all of the input/output you use, so the electrical team can wire between the signal and GND. In software, all pulled high inputs will be TRUE until the button is pressed, so NOT gates will become your friend. For analog Inputs, voltage in will be between 0v and 3.3v, or you can use the “analog range” for 0-1. There are also more advanced features, like two quadrature encoders on four inputs and some even more advanced IO on the Wireless connector (two DAC’s, PWM Out, HDDIO, etc. ) and you can also use the buttons , LED’s, 3-axis accelerometer, and touch slider on the board itself. It’s all in “Enhanced IO”. One thing you might find useful is the front panel. You can just put an indicator on all of the Cypress IO of the category you want and see what it does.

You make it sound so simple, but I guess you’re right. The best thing to do is to just check it out myself.

I’ll see what I can do next time I’ll be near the CRIO.

Thanks!

OK. I’ve managed to play around with the cypress and got it working. I used it to activated relays and PWMs on our robot and to my surprise it was a huge success. Thanks for everyone who helped!

But, I still have a few more questions:

The cypress pinout tells me there are 6 buttons on the board- one physical and 5 others in the wireless connector. How can I access the 5 other buttons and use them?

How can I connect a quad encoder and why sould I?

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?

And again, thanks for all your help!

WTF? Man, My mentor didn’t let me use the PSoC… I want to use it now…