Society of Robots - Robot Forum

Software => Software => Topic started by: ed1380 on December 31, 2008, 04:17:10 PM

Title: $50 uart- compiling error
Post by: ed1380 on December 31, 2008, 04:17:10 PM
i did the uart tutorial step by step, but it wont compile.
if i cut and past the original $50 robot code it works great. but if i add the uart stuff to it, it gives errors.
using no code between while and return, gives the same error as using minimal code. heres a screenshot. the error line is the  { after return

ive activated and deactivated every bit of the initialization stuff and it only gives more errors

heres what i have
(http://i43.photobucket.com/albums/e398/RussianCommy/screenie.jpg)
heres teh big pic http://i43.photobucket.com/albums/e398/RussianCommy/screenie.jpg
Title: Re: $50 uart- compiling error
Post by: Webbot on January 01, 2009, 04:34:13 PM
The 'return 0;' on line 62 is withinside your main loop !!!

You need to move it down a line or two so its after your closing '}' for the while statement
Title: Re: $50 uart- compiling error
Post by: ed1380 on January 02, 2009, 11:29:12 PM
why couldnt someone answer 12 hours earlier (http://i43.photobucket.com/albums/e398/RussianCommy/smilies/suicide.gif)

i burned my avrisp (http://i43.photobucket.com/albums/e398/RussianCommy/smilies/1190353201051.gif)
Title: Re: $50 uart- compiling error
Post by: TrickyNekro on January 02, 2009, 11:50:25 PM
They aren't so fragile.... are they....
I haven't burned any of my programmers so far....
Title: Re: $50 uart- compiling error
Post by: ed1380 on January 03, 2009, 09:40:54 AM
idk. IIRC the AVRISPII are the ones with overvolt protect.
i was messing around with mosfet drivers on the breadboard, and kinda connected the 12v powerbus wires with the 5v bus. idk about the atmega. i got a couple more of those, but poor avrisp (http://i43.photobucket.com/albums/e398/RussianCommy/smilies/cry.gif)
Title: Re: $50 uart- compiling error
Post by: HDL_CinC_Dragon on January 03, 2009, 10:29:02 AM
The 'return 0;' on line 62 is withinside your main loop !!!

You need to move it down a line or two so its after your closing '}' for the while statement
The bracket '}' on line 63 is the closing bracket for the while loop. The return is definitely inside the while loop... unless I missed a bracket somewhere?


-EDIT-
Any chance you could attach the code you are using, ed?
Title: Re: $50 uart- compiling error
Post by: ed1380 on January 03, 2009, 03:06:49 PM
everything is good now. it was that stupid bracket