View Single Post
  #7   Spotlight this post!  
Unread 11-27-2016, 04:04 PM
jman4747's Avatar
jman4747 jman4747 is offline
Just building robots
AKA: Josh
FRC #4080 (Team Reboot)
Team Role: CAD
 
Join Date: Apr 2013
Rookie Year: 2011
Location: Atlanta GA
Posts: 418
jman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond reputejman4747 has a reputation beyond repute
Re: Quick fix for getting serial data from CMUcam5 Pixy

So far the Pixy has done a pretty good job of finding reflective tape lit with green LED rings in a well lit area.

Right now I am having an odd problem with the RIO talking to the arduino. Whenever I run the labview code on my computer it works as intended but when I run it on the RIO it seems the RIO is writing to the serial port several times every time I tell it to write once. I double checked with the arduino sketch below and it seems to confirm that the RIO is writing several times every time the VISA write VI executes while the computer only writes once as intended.

Arduino:
Code:
void setup() {
  // put your setup code here, to run once:
Serial.begin(57600);
delay(2000);
Serial.print("on\n");

}

void loop() {

static String C = "wait\n";

  if (Serial.available() > 0)
  {
    C = Serial.readString();
    Serial.print(C);
  }

}
Attached Thumbnails
Click image for larger version

Name:	pixy-COM-RIO.png
Views:	26
Size:	164.2 KB
ID:	21307  
__________________
---------------------
Alumni, CAD Designer, machinist, and Mentor: FRC Team #4080

Mentor: Rookie FTC Team "EVE" #10458, FRC Team "Drewbotics" #5812

#banthebag
#RIBMEATS
#1620
Reply With Quote