-
Notifications
You must be signed in to change notification settings - Fork 4
Other Ways to Connect Pixy2
You have several options on how to physically connect Pixy2 to roboRIO. Pixy2LabVIEW supports three interfaces on roboRIO: I2C, SPI and UART. On roboRIO, there are a couple of options for both I2C and SPI, giving you five different ways to connect Pixy2 to roboRIO.
You have two options to connect Pixy2 to roboRIO via I2C. You can use the I2C connector or the MXP connector.
First, using PixyMon2, configure Pixy2 for I2C communication:
Select I2C from the "Data out port" and an available I2C address. (The default is 0x54.)
To use the I2C connector, connect Pixy2 as shown:
- Pixy 5V (2) --> roboRIO DIO 5V (you have several pin options shown is DIO 0 5V)
- Pixy GND (6) --> roboRIO I2C GND
- Pixy I2C SCK (3) --> roboRIO I2C SCL
- Pixy I2C SDA (9) --> roboRIO I2C SDA
In LabVIEW, use the Init I2C VI and use "I2C On-Board" bus and select the same I2C address that you used in the Pixy2 Configuration dialog above.
To use the MXP connector, connect Pixy2 as shown:
- Pixy 5V (2) --> roboRIO MXP 5V (1)
- Pixy GND (6) --> roboRIO MXP DGND (you have several pin options shown is DGND 12)
- Pixy I2C SCK (3) --> roboRIO MXP SCL (32)
- Pixy I2C SDA (9) --> roboRIO MXP SDA (34)
In LabVIEW, use the Init I2C VI and use "I2C MXP" bus and select the same I2C address that you used in the Pixy2 Configuration dialog above.
You have two options to connect Pixy2 to roboRIO via SPI. You can use the SPI connector or the MXP connector.
First, using PixyMon2, configure Pixy2 for SPI Slave Select communication:
To use the SPI connector, connect Pixy2 as shown:
- Pixy 5V (2) --> roboRIO SPI 5V
- Pixy GND (6) --> roboRIO SPI GND
- Pixy SPI MOSI (4) --> roboRIO SPI MOSI
- Pixy SPI MISO (1) --> roboRIO SPI MISO
- Pixy SPI SCK (3) --> roboRIO SPI SCLK
- Pixy SPI SS (7) --> roboRIO SPI CS0 (you have several pin options shown is CS0. Be sure the pin you wire matches your SPI initialization choice in LabVIEW!)
In LabVIEW, use the Init SPI VI and use "SPI On-Board, CSx" bus. You have four choices here. Just be sure to select the correct slave select index (CS0, CS1, CS2, CS3) as the one you wired to roboRIO.
To use the MXP connector, connect Pixy2 as shown:
- Pixy 5V (2) --> roboRIO MXP 5V (1)
- Pixy GND (6) --> roboRIO MXP DGND (you have several pin options shown is DGND 16)
- Pixy SPI MOSI (4) --> roboRIO MXP MOSI (25)
- Pixy SPI MISO (1) --> roboRIO MXP MISO (23)
- Pixy SPI SCK (3) --> roboRIO MXP SPI CLK (21)
- Pixy SPI SS (7) --> roboRIO MXP SPICS (19)
In LabVIEW, use the Init SPI VI and use "SPI MXP" bus:
You have only one choice when using Pixy connected directly to roboRIO via UART. That is to use the MXP connector. Connect Pixy2 as shown:
- Pixy 5V (2) --> roboRIO MXP 5V (1)
- Pixy GND (6) --> roboRIO MXP DGND (you have several pin options shown is DGND 8)
- Pixy UART Tx (4) --> roboRIO MXP UART.RX (10)
- Pixy UART Rx (1) --> roboRIO MXP UART.TX (14)
In LabVIEW, use the Init UART VI and use "MXP TTL" serial port.
Do not attempt to connect Pixy2 directly to the RS-232 port on roboRIO. The voltage levels are incompatible. You will need a RS-232 to TTL converter to use this port. By default the Pixy2 LabVIEW software does not support RS-232 mode, but you can easily enable it by looking at the block diagram of the UART Init VI and removing the case structure that throws the error.