<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:porting_guide

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:porting_guide [2018/12/17 23:38]
jfrench
wiki:v2:porting_guide [2019/02/25 18:54]
pixycam
Line 1: Line 1:
 ====== How to talk to Pixy2 ====== ====== How to talk to Pixy2 ======
  
-We currently have software support for [[wiki:​v2:​Hooking_up_Pixy_to_a_microcontroller_-28like_an_arduino-29|Arduino]],​ and [[wiki:​v2:​Hooking_up_Pixy_to_a_Raspberry_Pi|Raspberry Pi and similar controllers]]+We currently have software support for [[wiki:​v2:​Hooking_up_Pixy_to_a_microcontroller_-28like_an_arduino-29|Arduino]], [[wiki:​v2:​pixy_lego_quick_start|LEGO Minstorms EV3]], [[wiki:​v2:​hooking_up_pixy2_to_roborio|roboRIO]], and [[wiki:​v2:​Hooking_up_Pixy_to_a_Raspberry_Pi|Raspberry Pi and similar controllers]]
  
 You may want Pixy2 to talk to a different controller and that's not a problem -- Pixy2 is easy to strike up a conversation with! It's easier than the original Pixy.  Pixy2 has three separate methods of communication:​ You may want Pixy2 to talk to a different controller and that's not a problem -- Pixy2 is easy to strike up a conversation with! It's easier than the original Pixy.  Pixy2 has three separate methods of communication:​
Line 37: Line 38:
  
  
-{{wiki:v2:image_380.png}}+{{wiki:v1:image_743.png}}
  
  
Line 46: Line 47:
   * analog/​digital x - this will output the x value of the largest detected object as an analog value between 0 and 3.3V on pin 8. It also outputs whether an object is detected or not as a digital signal (pin 1 of the I/O connector).   * analog/​digital x - this will output the x value of the largest detected object as an analog value between 0 and 3.3V on pin 8. It also outputs whether an object is detected or not as a digital signal (pin 1 of the I/O connector).
   * analog/​digital y - this will output the y value of the largest detected object as an analog value between 0 and 3.3V on pin 8. It also outputs whether an object is detected or not as a digital signal (pin 1 of the I/O connector).   * analog/​digital y - this will output the y value of the largest detected object as an analog value between 0 and 3.3V on pin 8. It also outputs whether an object is detected or not as a digital signal (pin 1 of the I/O connector).
 +  * LEGO I2C - this is a special protocol for LEGO Mindstorms EV3 brick.
  
 Note, the USB interface and protocol is always enabled, while each of the interfaces above can only be enabled one at a time. Note, the USB interface and protocol is always enabled, while each of the interfaces above can only be enabled one at a time.
Line 66: Line 68:
   - Slave select is active low   - Slave select is active low
   - Uses SPI mode 3, as described on [[https://​www.corelis.com/​education/​tutorials/​spi-tutorial/​|this page]]   - Uses SPI mode 3, as described on [[https://​www.corelis.com/​education/​tutorials/​spi-tutorial/​|this page]]
-  - 3.3V signals+  - 3.3V outputs, 5V tolerant inputs
  
 Pixy2 also supports SPI with slave select (SPI with SS). Pixy2 also supports SPI with slave select (SPI with SS).
Line 109: Line 111:
 Here's how to hook up your controller'​s UART to Pixy: Here's how to hook up your controller'​s UART to Pixy:
  
-  - Pin 10 ➜ your controller'​s ground signal+  - Pin ➜ your controller'​s ground signal
   - Pin 1 (UART RX) ➜ your controller'​s UART TX output   - Pin 1 (UART RX) ➜ your controller'​s UART TX output
   - Pin 4 (UART TX) ➜ your controller'​s UART RX input   - Pin 4 (UART TX) ➜ your controller'​s UART RX input
Line 252: Line 254:
  
  
-We have a [[wiki:​v2:​protocol_reference|complete protocol reference]].  It will be very helpful if you are porting to a platform in a language other than C++.    +We have a complete protocol reference ​below.  It will be very helpful if you are porting to a platform in a language other than C++.  But if you are using C/​C++, ​TPixy2.h ​is a good starting point. ​ It uses the LinkType class to communicate with Pixy2. ​ It assumes some member functions and an implementation of millis() and delayMicroseconds(),​ as shown in the header code below:
- +
- +
-TPixy2.h uses the LinkType class to communicate with Pixy2. ​ It assumes some member functions and an implementation of millis() and delayMicroseconds(),​ as shown in the header code below:+
  
 <​code>​ <​code>​
Line 320: Line 319:
 If you need help, post on our [[https://​forum.pixycam.com/​|forum]] or send us an email ([email protected]). ​ Happy coding! If you need help, post on our [[https://​forum.pixycam.com/​|forum]] or send us an email ([email protected]). ​ Happy coding!
  
 +
 +{{page>​wiki:​v2:​protocol_reference&​noindent}}
  
  
  
wiki/v2/porting_guide.txt · Last modified: 2020/04/27 19:08 by jfrench