I have an arduino uno working out of Windows 7, after I sucessfully upload the program nothing happens.
What seems to be the problem??
I have an arduino uno working out of Windows 7, after I sucessfully upload the program nothing happens.
What seems to be the problem??
Three questions:
The more detailed you are on #2 and #3 the better the help you will get. "Nothing" gives nothing to go on...
Whenever I run into a problem like this, I create a new sketch where I just blink the LED on Pin 13. It requires no external hardware, the code is basic, and it lets me know that the board is, in fact, working. Then I start adding components and code to my project and checking as I go to make sure it runs correctly. Good luck!
void setup(){
pinMode(13, OUTPUT);
}
void loop(){
digitalWrite(13, LOW);
delay(100);
digitalWrite(13, HIGH);
delay(100);
}
Sorry about not giving any information James C4S
dsluder13 I will try your suggestion
Thanks
LED2_1.pde (3.2 KB)
- nothing happens, it just says done uploading.
void setup()
{
for(i=2; i=11; i++) //set up all 10 Pins for outputs leave pin 0 and 1 for serial communication
pinMode(i, OUTPUT); //from the computer. Used for debugging.
reset(); // sub rutin resets, put all pins to low.
Serial.begin(9600);
tx.begin (9600); //9600 bits per seconds. can make it higher or lower for BAUD rate
rx.begin(9600);
delay(1000); //One Second Delay.
tx.print('b'); //sending a b wakes up the VRBOT. Recommended..
for (i=0;i<100;i++){ //no buffer, so we have to listen to pin and catch it right away because if a bit flys into a software pin it's not going to stay there
if(rx.read()=='o'){ //the for loop will do this 100 to catch the b and it will send a o if it is a success
Serial.println("awake");
break; //break the the loop.
}
delay(1); // 1 ms delay
}//for
It makes it far easier to read and debug.
Why are you doing Serial.begins() inside of a for() loop? That is something that should be only done once.
You still have not explained what you EXPECT to happen. "nothing happens" explains nothing. What is suppose to be happening? What are you looking at to determine "nothing" happens. You keep saying "it". What is "it"?
I am a beginner at programming, this code I got online, and I'm using it as a guildline between the arduino uno and the vrbot voice recognition module.
it is properly indented if you open it with the arduino software
You ask what does happen and I am telling you "nothing", I wish I can tell you something but I'm getting nothing.
This piece at least is ok (the for loop is just looping with the single statement after it)
SoftwareSerial is deprecated these days; use NewSoftSerial instead. It doesn't need the tight looping construct you've had to use to avoid missing chars. However, this:
for (i=0;i<100;i++){ //no buffer, so we have to listen to pin and catch it right away because if a bit flys into a software pin it's not going to stay here
if(rx.read()=='o'){ //the for loop will do this 100 to catch the b and it will send a o if it is a success
Serial.println("awake");
break; //break the the loop.
}
will likely be executed long before the VRBot sends anything back, so you'll see nothing there.
Lastly, you say that 'nothing happens, it just says done uploading.' Are you running the serial monitor (or other terminal program) to capture the serial prints you have? It doesn't get invoked automatically, you have to do it yourself (Rightmost button on the top of the IDE). Put a Serial.println("Hello BobbyChom"); as the first line in setup & make sure you can see that in the monitor before you move on to more debugging.
Hey wildbill,
I had newserialsoft before and it said it didnt recognize it, but I will try it again.
I did look at the serial monitor and no serial prints.
Put a Serial.println("Hello BobbyChom"); as the first line in setup & make sure you can see that in the monitor before you move on to more debugging.
[/quote]
Actually of course, this println needs to be after Serial.Begin, but the advice still stands - prove to yourself that you can get something, anything in the serial monitor before you move on. Write a sketch that does nothing but that if necessary.
Wildbill,
I got it to print "hello bobby", but i had to add it to the blank code. when I add it to the program, it didn't print.
also the software doesn't recognize the NewSoftSerial library.