Hi,
Im trying to use my Arduino Uno R1. I have not had any success getting response from the RX. when i run a while(Serial.available=0), it will hang there forever. I have also tried doing an iteration of serial reads in my set-up just to ensure there was nothing in the buffer when i ran the "available" command.
Any thoughts or ideas? Any suggestions on how i would test if my RX is broke? I have extra Atmel chips. I have tried replacing it with a new one, and it doesnt seem to fix the problem.
The example on the site doesnt work. I am using a USB to Arduino cable E101344-C. I believe this should allow me to do both RX/TX. I have used it for past projects, but dont recall if they required Serial.reads.
int incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}