|
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);
}
}
__________________
---------------------
Alumni, CAD Designer, machinist, and Mentor: FRC Team #4080
Mentor: Rookie FTC Team "EVE" #10458, FRC Team "Drewbotics" #5812
#banthebag
#RIBMEATS
|