View Single Post
  #8   Spotlight this post!  
Unread 13-04-2014, 23:06
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,105
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: Looking at trying new things for next year. Fits into electrical and programming

Quote:
Originally Posted by gappleto97 View Post
Hi! To get introductions out of the way, I'm the head programmer (Java) of Marquette's team 3617 Cold Logic. Next year will be the first that we've had more than one dedicated programmer (with the ones that helped me this year focusing significantly more on electrical, and only one actually manipulating code, on our arduino). All of these questions are for things that I would like to tackle for next year, while leaving the simpler work to my newly found sub-team.

My questions are as follows:

1) is there any real advantage to wiring Jags via CAN, and what differences does it make in programming (other than using the CANJaguar class)?

2) if we were to wire via CAN, wouldn't this take up Ethernet ports? And since I assume so, does this mean we are permitted an additional router to wire in this way?

3) this year we used PWMs and a breadboard to communicate variables to the arduino unit, which we used to control our LEDs. I know that we could do this over ethernet, but how do you send the variables? I've never had to deal with network-end programming, although my now-graduated predecessor did.

4) if either the answer to 2 is no, or the answer to 3 is sufficiently complicated, is there a way to set all outputs to false upon disable? This was the problem we had with our current setup, and if this could be solved, there would be no need to switch over to Ethernet.

5) is an extension of three. If we were to use a Raspberry Pi for our vision tracking next year, which I can work on nearly immediately, how do I send the information to the cRIO? I would prefer for there not to be anything on how to do the actual tracking in here, however. I like a challenge.

6) how do you wire encoders into the system? It's just that simple. What ports where? Etc.

Thank you in advance for the help. I really appreciate it.

And don't feel like you need to hold back on jargon, or complicated ideas. Programming is both my forte, and my major, as I'm dual-enrolling at the local university.
Something to remember is that next year we are moving to the new RoboRIO control system. It has a built in CAN bus that doesn't take up an ethernet port or a serial port, and there should be a new speed controller that is able to use the new connections. So questions 1 and 2 will be unknown until they release more information.

3: Over ethernet, you could send packets using UDP or TCP, and read those packets using the arduino.

4: The digital IO and PWM outputs all should get disabled upon the robots getting disabled. We just use a few digital outputs from the sidecar, and they work just fine in controlling an arduino.

5: You can use the same methods as 3. Also, if using python, you can use pynetworktables to communicate using the SmartDashboard libraries.

6: Wire power and ground, and then send the outputs from the encoders to any 2 digital inputs on the sidecar. The built in libraries will accept any 2 pins, and then you just have to set the parameters correctly to make sure it gives the right outputs.
__________________
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.