Skip to content

Commit 19affb3

Browse files
2 parents cc1f437 + b2789f5 commit 19affb3

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# Pixy2JavaAPI
2+
3+
[![Build Status](https://ci.otake.pw/buildStatus/icon?job=Pixy2JavaAPI&subject=Jenkins)](https://ci.otake.pw/job/Pixy2JavaAPI/)
4+
[Latest Javadocs](https://ci.otake.pw/job/Pixy2JavaAPI/javadoc/index.html?overview-tree.html)
5+
26
Pixy2 API ported to Java for FIRST Robotics RoboRIO
37

4-
Supported link types: SPI, I2C (Untested), UART/Serial (Untested)
8+
Port by PseudoResonance (Josh Otake) with help from other various contributors.
59

6-
New link types can be easily added by implementing Link
10+
Thank you for your support and usage of this API!
711

812
[Original Pixy2 Code for C++ Arduino](https://github.com/charmedlabs/pixy2/tree/master/src/host/arduino/libraries/Pixy2)
913

14+
Please read the [wiki](https://github.com/PseudoResonance/Pixy2JavaAPI/wiki) for more detailed information about Pixy2JavaAPI!
15+
1016
---
1117
## Installing the API
1218
To install the API, it can either be downloaded and copied directly into the project, or you can use it with Gradle/Maven.
@@ -15,7 +21,7 @@ The maven repository is located at: https://nexus.otake.pw/repository/maven-publ
1521

1622
Add `maven { url 'https://nexus.otake.pw/repository/maven-public/' }` under `repositories`
1723

18-
Add `compile 'pw.otake.pseudoresonance:pixy2-java-api:1.1'` under `dependencies` Replace `1.1` with the current version of the API.
24+
Add `compile 'pw.otake.pseudoresonance:pixy2-java-api:1.3.4'` under `dependencies` Replace `1.3.4` with the current version of the API.
1925

2026
Your `build.gradle` should resemble this:
2127

@@ -29,7 +35,7 @@ repositories {
2935
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
3036
// Also defines JUnit 4.
3137
dependencies {
32-
compile 'pw.otake.pseudoresonance:pixy2-java-api:1.1'
38+
compile 'pw.otake.pseudoresonance:pixy2-java-api:1.3.4'
3339
compile wpi.deps.wpilib()
3440
compile wpi.deps.vendor.java()
3541
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
@@ -40,12 +46,20 @@ dependencies {
4046

4147
---
4248
## Using the API
43-
First create a Pixy2 camera object with `Pixy2 pixy = Pixy2.createInstance(link)` and supply the link type of your choosing. Next, initialize the Pixy2 camera with `pixy.init(arg)`. You can either omit arg, your add a value based on the link type.
49+
First create a Pixy2 camera object with `Pixy2 pixy = Pixy2.createInstance(link)` and supply the link type of your choosing. Next, initialize the Pixy2 camera with `pixy.init(arg)`. You can either omit arg, or add a value based on the link type.
50+
51+
The Pixy2 can now be called on with the various provided methods as outlined in the documentation included in the code and on the Pixy2 website.
52+
53+
Please read the [wiki](https://github.com/PseudoResonance/Pixy2JavaAPI/wiki/Using-the-API) for more information about how to use the API, including examples.
54+
55+
---
56+
## Supported Links to Communicate with Pixy
57+
SPI, I2C (Untested), UART/Serial (Untested)
4458

45-
The Pixy2 can now be called on with the various provided methods as outlined in the documentation and on the Pixy2 website.
59+
New link types can be easily added to support future hardware, or other Java-based projects by implementing [Link](https://github.com/PseudoResonance/Pixy2JavaAPI/blob/master/src/main/java/io/github/pseudoresonance/pixy2api/links/Link.java)
4660

4761
---
48-
## Connecting Pixy2 to RoboRIO
62+
## Wiring Pixy2 to RoboRIO
4963
SPI is the recommended link type due to it's higher data transfer rate as well as better implementation in the WPILib API which helps with efficiency.
5064

5165
### SPI
@@ -68,7 +82,7 @@ SPI is the recommended link type due to it's higher data transfer rate as well a
6882
| 6 | ⏚ Ground |
6983
| 9 | SDA |
7084

71-
**NOTE**: The RoboRIO does not have a 5V output for I2C, and thus, the 5V must be sourced elsewhere, such as from the VRM.
85+
**NOTE**: The RoboRIO does not have a 5V output for I2C, and thus, the 5V must be sourced elsewhere, such as from the VRM, or another 5V pin.
7286

7387
### UART/Serial/RS-232
7488
| Pixy2 Port | RoboRIO Port |
@@ -78,7 +92,7 @@ SPI is the recommended link type due to it's higher data transfer rate as well a
7892
| 4 | TXD |
7993
| 6 | ⏚ Ground |
8094

81-
**NOTE**: The RoboRIO does not have a 5V output for UART/Serial/RS-232, and thus, the 5V must be sourced elsewhere, such as from the VRM.
95+
**NOTE**: The RoboRIO does not have a 5V output for UART/Serial/RS-232, and thus, the 5V must be sourced elsewhere, such as from the VRM, or another 5V pin.
8296

8397
#### Pixy2 Pinout
8498
![Pixy2 Pinout](https://docs.pixycam.com/wiki/lib/exe/fetch.php?w=640&tok=f1a03d&media=wiki:v2:image_248_2.jpg "Pixy2 Pinout")

0 commit comments

Comments
 (0)