Go to Post Well, it worked in inventor . . . - Chris Fultz [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 10-01-2017, 17:48
DevOrc's Avatar
DevOrc DevOrc is offline
Registered User
FRC #4283 (INSPIRE ROBOTICS)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2016
Location: Granville, Ohio
Posts: 8
DevOrc is an unknown quantity at this point
Serial Port Not Finding Pixy Camera

We are trying to use the Pixy camera for vision targeting. We have it hooked up to the USB Port on the RoboRio. However we keep on getting the same error when we create the Serial Port object.
Code:
 java.lang.RuntimeException:  Code: -1123. HAL: The specified serial port device was not found 
 	at edu.wpi.first.wpilibj.hal.SerialPortJNI.serialInitializePort(Native Method) 
 	at edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:112) 
 	at edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:160) 
 	at org.usfirst.frc.team4283.robot.vision.RobotCamera.initTeleop(RobotCamera.java:21) 
 	at org.usfirst.frc.team4283.robot.Robot.teleopInit(Robot.java:68) 
 	at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:123) 
 	at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2017, 17:57
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,106
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Serial Port Not Finding Pixy Camera

Quote:
Originally Posted by DevOrc View Post
We are trying to use the Pixy camera for vision targeting. We have it hooked up to the USB Port on the RoboRio. However we keep on getting the same error when we create the Serial Port object.
Code:
 java.lang.RuntimeException:  Code: -1123. HAL: The specified serial port device was not found 
 	at edu.wpi.first.wpilibj.hal.SerialPortJNI.serialInitializePort(Native Method) 
 	at edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:112) 
 	at edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:160) 
 	at org.usfirst.frc.team4283.robot.vision.RobotCamera.initTeleop(RobotCamera.java:21) 
 	at org.usfirst.frc.team4283.robot.Robot.teleopInit(Robot.java:68) 
 	at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:123) 
 	at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)
If you log into the web dash on the roboRIO, http://wpilib.screenstepslive.com/s/...o-webdashboard, you should see 3 serial port objects. What shows up for the last one? ASRL1 and ASRL2 are the built in serial ports.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2017, 18:08
DevOrc's Avatar
DevOrc DevOrc is offline
Registered User
FRC #4283 (INSPIRE ROBOTICS)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2016
Location: Granville, Ohio
Posts: 8
DevOrc is an unknown quantity at this point
Re: Serial Port Not Finding Pixy Camera

The web dashboard shows three other things on the list:

1. CAN Interface
2.Pixy
3.Pixy
Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2017, 18:21
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,106
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Serial Port Not Finding Pixy Camera

Quote:
Originally Posted by DevOrc View Post
The web dashboard shows three other things on the list:

1. CAN Interface
2.Pixy
3.Pixy
So they show up, but I need the actual names of the serial ports. If you click on each one, what data does it show? I don't remember the exact name, but there should be a string that starts with /dev . can I get that name?
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #5   Spotlight this post!  
Unread 10-01-2017, 21:28
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,106
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Serial Port Not Finding Pixy Camera

So doing some research, and the Pixy is not a USB serial device. It's USB connection uses a custom app to talk to the device. So that is why it is not working. However, you should be able to hook up the uart on the expansion connector to the roborio uart on the MXP, then use the MXP setting for the wpilib serial port. Note do not try to hook up to the RS-232 port on the roboRIO, as this will break the Pixy.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-01-2017, 06:44
DevOrc's Avatar
DevOrc DevOrc is offline
Registered User
FRC #4283 (INSPIRE ROBOTICS)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2016
Location: Granville, Ohio
Posts: 8
DevOrc is an unknown quantity at this point
Re: Serial Port Not Finding Pixy Camera

Ok! I will try that later when we have our meeting. Thank you!
Reply With Quote
  #7   Spotlight this post!  
Unread 11-01-2017, 15:06
DevOrc's Avatar
DevOrc DevOrc is offline
Registered User
FRC #4283 (INSPIRE ROBOTICS)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2016
Location: Granville, Ohio
Posts: 8
DevOrc is an unknown quantity at this point
Re: Serial Port Not Finding Pixy Camera

Ok, I talked to the team today and We have two questions:

1: What cable would we use to hook it up to the MXP Port?
2: Could we use the NVIDIA Jetson?
Reply With Quote
  #8   Spotlight this post!  
Unread 13-01-2017, 08:56
Xanawatt Xanawatt is offline
Registered User
FRC #1024
 
Join Date: May 2015
Location: Indianapolis, Indiana
Posts: 24
Xanawatt is an unknown quantity at this point
Re: Serial Port Not Finding Pixy Camera

Quote:
Originally Posted by DevOrc View Post
Ok, I talked to the team today and We have two questions:

1: What cable would we use to hook it up to the MXP Port?
2: Could we use the NVIDIA Jetson?
You would most likely have to make a custom cable(ours is just several single pin connectors all hot glued in the connection). We used the I2C interface and it works ok. And if you use the I2C, you dont even have to connect it to the mxp, you could just connect it directly to the RoboRIO. I would love to share the code and help
Reply With Quote
  #9   Spotlight this post!  
Unread 14-01-2017, 14:59
Coach Seb's Avatar
Coach Seb Coach Seb is online now
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 115
Coach Seb is an unknown quantity at this point
Re: Serial Port Not Finding Pixy Camera

Please share !!! i will be the next one asking as soon as my dev environemnt is setup....
Reply With Quote
  #10   Spotlight this post!  
Unread 15-01-2017, 21:50
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 37
loafdog is on a distinguished road
Re: Serial Port Not Finding Pixy Camera

I'm guessing this might be code Xanawatt is referring to?
https://github.com/Xanawatt/PixyI2C
Just a guess..

I'd like to see more info how you or anyone else actually connected the pixy to the hw. Wiring info and/or pics of what you did would be really helpful. We are trying to figure out which method to use to connect pixy to roborio. I think our choices are(in order of preference) i2c, uart serial, or plain ol analog/digital.

Related, i also found a few repos that contained what looks like uart serial code. This is just one example: https://github.com/Zero2848/PixyCamTest
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 12:34.

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


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