Author Topic: $50 uart- compiling error  (Read 5809 times)

0 Members and 1 Guest are viewing this topic.

Offline ed1380Topic starter

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
$50 uart- compiling error
« 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

heres teh big pic http://i43.photobucket.com/albums/e398/RussianCommy/screenie.jpg
« Last Edit: December 31, 2008, 04:18:05 PM by ed1380 »
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: $50 uart- compiling error
« Reply #1 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
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline ed1380Topic starter

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: $50 uart- compiling error
« Reply #2 on: January 02, 2009, 11:29:12 PM »
why couldnt someone answer 12 hours earlier

i burned my avrisp
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: $50 uart- compiling error
« Reply #3 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....
For whom the interrupts toll...

Offline ed1380Topic starter

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: $50 uart- compiling error
« Reply #4 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
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: $50 uart- compiling error
« Reply #5 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?
« Last Edit: January 03, 2009, 10:32:22 AM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline ed1380Topic starter

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: $50 uart- compiling error
« Reply #6 on: January 03, 2009, 03:06:49 PM »
everything is good now. it was that stupid bracket
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

 


Get Your Ad Here