Git Product home page Git Product logo

wpilib_pixy_spi_java's Introduction

Will fill more of this in later, but for now.

This is a complete eclipse project of wpilib java for the FRC 2017 season. This includes a subsystem that reads data from a Pixy camera over SPI.

Look over Vision.java in the subsystems directory for an example of how to loop through the pixy data.

Debugging to the SmartDashboard and to the console / FRC_userprogram_log is included, but turned off by default. Turning on debugging by changing the debug value in PixySPI.java. The code will drop data if you turn on logging / console debugging. It appears less data is lost using just SmartDashboard debugging. Debugging is off by default.

Values available. Signature, center X, center Y, Width, Height for each object. Code will return all available data for all found objects. Each loop through readPackets will return all the data currently available for all found objects of all the signatures. Filtering needs to be done in your code.

This code was derived from

https://github.com/omwah/pixy_rpi

https://github.com/charmedlabs/pixy

https://github.com/BHSRobotix/Steamworks2017

Code is of course GNU v2 licensed. License files incoming per gnu licensing guidelines.

To connect the pixy to your RoboRio, follow the pinout below.

MISO - pixy 1 - rio spi 7

SCK - pixy 3 - rio spi 3

MOSI - pixy 4 - rio spi 5

SS - pixy 7 - rio spi 2

GND - pixy 6 | 8 | 10 - rio spi 1

GND, on the Pixy can be anyone of the pins shown, I normally use pixy 6 to keep the wires close. SS is not required, but put it in for future use. MISO, SCK and MOSI are required regardless.

Pin 1 on the Pixy is closet to the cut of corner of the silkscreen on the pcb. Pin 1 on the rio is GND. All odd pins run the long row on same side as pin 1, even numbers are the pins in the opposite row. So running in the 2x5 config, it would go, 1 and 2, then 3 and 4, then 5 and 6, then 7 and 8 and finally 9 and 10. In the 5x2 config it would go 1,3,5,7,9 then 2,4,6,8,10. Try to keep the cable length short, no more than 2 feet and that might be pushing it.

wpilib_pixy_spi_java's People

Contributors

croadfeldt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wpilib_pixy_spi_java's Issues

License or ok to reuse Pixy code

Hi, I'm working with a team that is looking at using a PixyCam, and found this repo. I've been able to import all of your Pixy/Vision classes, and would like to keep working with them. Is it ok if we reuse your code? Would you consider adding an open-source license to your repo (or specifically the Pixy and Vision classes)? Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.