<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:can_i_use_my_lego_pixy_with_arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
wiki:v2:can_i_use_my_lego_pixy_with_arduino [2018/05/28 01:41]
pixycam
wiki:v2:can_i_use_my_lego_pixy_with_arduino [2019/01/31 03:24]
pixycam
Line 3: Line 3:
  
  
-====== Can I use my LEGO Pixy with Arduino? ======+====== Can I use my LEGO Pixy2 with Arduino? ======
  
-You can! You just need to use the "​general"​ version of the firmware, and you need to get an Arduino cable. We hope to have these available for sale separately soon, but in the meantime you can make one.+You can! You just need to use the "​general"​ version of the firmware, and you need to make (or somhow obtain) a Pixy2 Arduino cable. ​
  
  
 ===== Changing the firmware ===== ===== Changing the firmware =====
  
-You need to download the latest "​general"​ firmware [[https://​pixycam.com/​downloads-pixy2/​|here]] (it's the version that isn't the LEGO version) and follow the firmware upload instructions [[wiki:​v2:​Uploading_New_Firmware|here]]. Don't worry -- it's pretty easy. And you'll still be able to use your Pixy with LEGO (see **Switching back to LEGO** below.)+You need to download the latest "​general"​ firmware [[https://​pixycam.com/​downloads-pixy2/​|here]] (it's the version that isn't the LEGO version) and follow the firmware upload instructions [[wiki:​v2:​Uploading_New_Firmware|here]]. Don't worry -- it's pretty easy. And you'll still be able to use your Pixy2 with LEGO (see **Switching back to LEGO** below.)
  
  
Line 20: Line 20:
 http://​www.digikey.com/​product-detail/​en/​71600-006LF/​609-2841-ND/​1302571 http://​www.digikey.com/​product-detail/​en/​71600-006LF/​609-2841-ND/​1302571
  
-10-pin (Pixy side, for I/O connector)\\+10-pin (Pixy2 side, for I/O connector)\\
 http://​www.digikey.com/​product-detail/​en/​101-106/​ED10500-ND/​2794212 http://​www.digikey.com/​product-detail/​en/​101-106/​ED10500-ND/​2794212
  
Line 31: Line 31:
 http://​www.digikey.com/​product-detail/​en/​cnc-tech/​304-28-10-MC-0100F/​CN223MC-100-ND/​5864952 http://​www.digikey.com/​product-detail/​en/​cnc-tech/​304-28-10-MC-0100F/​CN223MC-100-ND/​5864952
  
-The connectors can be purchased through other electronics suppliers (Mouser, Element14, etc.) Pretty much any 6 and 10-pin IDC crimp, 0.1" spacing connector will work, but the polarized versions of these connectors are good, particularly for the 10-pin connector, to make sure you plug into your Pixy with the correct polarity. The cable crimps easily, no tools necessary, and you can make the cable the length you want. Although, the longer the more likelihood for noise, but 2 ft or less should be fine. You just want to make sure that you crimp with pin 1 going to the red wire on both ends. The only (somewhat) confusing thing is that one connector is 10 pins and the other is 6 pins. When crimping to the 10-pin connector, just make sure you shift the cable over such that pin 1 (red) lines up with the pin 1 of the connector (indicated with the triangle). So you'll have 4 "​uncrimped"​ pins on the 10-pin connector, but pin 1 is still pin 1... It's pretty straightforward,​ really.+The connectors can be purchased through other electronics suppliers (Mouser, Element14, etc.) Pretty much any 6 and 10-pin IDC crimp, 0.1" spacing connector will work, but the polarized versions of these connectors are good, particularly for the 10-pin connector, to make sure you plug into your Pixy2 with the correct polarity. The cable crimps easily, no tools necessary, and you can make the cable the length you want. Although, the longer the more likelihood for noise, but 2 ft or less should be fine. You just want to make sure that you crimp with pin 1 going to the red wire on both ends. The only (somewhat) confusing thing is that one connector is 10 pins and the other is 6 pins. When crimping to the 10-pin connector, just make sure you shift the cable over such that pin 1 (red) lines up with the pin 1 of the connector (indicated with the triangle). So you'll have 4 "​uncrimped"​ pins on the 10-pin connector, but pin 1 is still pin 1... It's pretty straightforward,​ really.
  
 This video provides some more details on crimping your own cables (ignore the fact that it's for Raspberry Pi.) Also, since you are only crimping 6 and 10-pin connectors, you probably won't need a vice. Just use a hard flat object to press against the backing of the connector to get it seated completely. This video provides some more details on crimping your own cables (ignore the fact that it's for Raspberry Pi.) Also, since you are only crimping 6 and 10-pin connectors, you probably won't need a vice. Just use a hard flat object to press against the backing of the connector to get it seated completely.
Line 45: Line 45:
 ===== Testing it out ===== ===== Testing it out =====
  
-The general firmware uses the **Arduino ICSP SPI** communication mode by default, which is what you want, so there should be no need to adjust the interface mode. Just follow the instructions [[wiki:​v2:​Hooking_up_Pixy_to_a_microcontroller_-28like_an_arduino-29|here]] regarding how to get your Pixy talking to your Arduino.+The general firmware uses the **Arduino ICSP SPI** communication mode by default, which is what you want, so there should be no need to adjust the interface mode. Just follow the instructions [[wiki:​v2:​Hooking_up_Pixy_to_a_microcontroller_-28like_an_arduino-29|here]] regarding how to get your Pixy2 talking to your Arduino.
  
  
 ===== Switching back to LEGO ===== ===== Switching back to LEGO =====
  
-If you want to switch back to using Pixy with LEGO Mindstorms, you do **not** need to change back to the LEGO firmware (yay!) You just need to set the **Data out port** to **LEGO I2C** in the [[wiki:​v2:​Interface_Pane|Interface Tab]] in PixyMon. **Note - this tab is only available if you are running the stock (non-LEGO) firmware on your Pixy.**+If you want to switch back to using Pixy2 with LEGO Mindstorms, you do **not** need to change back to the LEGO firmware (yay!) You just need to set the **Data out port** to **LEGO I2C** in the [[wiki:​v2:​Interface_Pane|Interface Tab]] in PixyMon. **Note - this tab is only available if you are running the stock (non-LEGO) firmware on your Pixy.**
  
-{{wiki:img:ee1f33b099825ca886ad5ba005928043bd30eb0c.png?400}}+{{wiki:v1:image_742.png}}
  
-And, of course, switch back to using the LEGO cable.+And, of course, switch back to using the Pixy2 LEGO cable.
  
 To switch back to Arduino, just set the **Data out port** back to **Arduino ICSP SPI**. To switch back to Arduino, just set the **Data out port** back to **Arduino ICSP SPI**.
wiki/v2/can_i_use_my_lego_pixy_with_arduino.txt ยท Last modified: 2019/02/15 22:11 by jfrench