Go to Post I'm a lazy mechanical designer. Any problem I can bunt into the programming world I will. - JamesCH95 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-06-2018, 09:20 PM
blakehelton blakehelton is offline
Registered User
FRC #1984
 
Join Date: Apr 2018
Location: Overland Park, Kansas
Posts: 1
blakehelton is an unknown quantity at this point
How to use Pixy over I2C?

Hello! I need to write code to use a Pixy over the I2C interface to get, for now, the X, Y, and Size of an object. We've been using just Analog-Digital for awhile, but need to track multiple objects now. I've looked at some code from other teams, but can't entirely seem to figure out how I should be doing this. Any help would be greatly appreciated!
Reply With Quote
  #2   Spotlight this post!  
Unread 04-08-2018, 12:50 PM
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 507
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: How to use Pixy over I2C?

I've never used the pixy before, but there seems to be a number of posts and github programming examples available.

FRC2876 - 2017 code
https://github.com/BHSRobotix/Steamw...s/PixyI2C.java
https://github.com/BHSRobotix/Steamw...ision.java#L55

FRC2363 - 2017 Code
https://github.com/TripleHelixProgra...util/Pixy.java
https://github.com/TripleHelixProgra...PixyCheck.java
https://github.com/TripleHelixProgra...rnToX.java#L79

CD Post w/ useful links:
https://www.chiefdelphi.com/forums/s...d.php?t=154371
__________________
http://team2168.org
Reply With Quote
  #3   Spotlight this post!  
Unread 04-09-2018, 08:14 PM
4ShocK 4ShocK is offline
Registered User
AKA: Jarrett Fritz
FRC #2977 (Sir Lancer Bots)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2009
Location: La Crescent, MN
Posts: 9
4ShocK is an unknown quantity at this point
Re: How to use Pixy over I2C?

1. You will need to make a cable. Our team got these from Amazon.

2. Cut the end of one of the connectors and follow the chart here. Just make sure that the end you are starting with has the red stripe (or whatever color you plan on using) as 1. Otherwise prepare to be very confused.

3. Follow the lines and see which ones need to go to the roborio's i2c. You can leave out the 3v port on the roborio, we chose to power the pixy from the VRM. You can find a pinout for that if you arent doing so already.

4. Once you are done with that, just put it in a 4 pin housing and it should work.

I also have code on my github.
If you need any help, let me know. I write things in a confusing manner
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:19 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi