Show Posts
Pages: [1] 2 3 ... 9
1  Using Arduino / Programming Questions / Re: Label related compiler error on: February 01, 2013, 02:22:03 pm
And do you think we could please leave it at that? I'd appreciate it very much if an admin would trim this thread back to (leaving) reply #7.
2  Using Arduino / Programming Questions / Re: Label related compiler error on: February 01, 2013, 02:20:33 pm
One reason I disregarded the error, was that it didn't tell me where to put the semi-colon. It just said "expected `;' before '}'". In the original situation, the line number it gave was off by about 25 lines (as is typical with Arduino errors).

Nick, I came right out and said that I tend to dis-regard the errors, implying that this time I made a mistake in doing so. Asking how to kill someone implies you are trying to do something wrong. Asking about a compiler error, or even asking how to use goto does not imply anything more than the programmer is using bad programming practice. There is nothing wrong with using goto. It's a legitimate command, that if mis-used, would probably only mean future debugging troubles.

GoForSmoke, probably 70-90 percent of my forum posts have been to help others, not to ask for help.

As far as I am concerned, this thread should have ended after reply #7. At that point, I had the answer to my question (I was satisfied), and there were several warnings against using goto (everyone else should have been satisfied). What more could one want?
3  Using Arduino / Programming Questions / Re: Label related compiler error on: February 01, 2013, 02:12:20 am
Okay, I can understand where you are coming from.

I this case, I was just playing around with labels for testing the logic of a program. I wasn't planning on using them in the end, just in the design process. Meanwhile I ran into an error, and though I'd ask about it.

Is there a way though, that I can ask questions and have people answer them without trying to solve the "less optimal" underlying design? Perhaps some sort of "magical" key word that indicates I'm looking for answers to my questions, but I'm not looking for help with the underlying design, or the pros and cons of the situation (or a discussion about something unrelated to my questions)?
4  Using Arduino / Programming Questions / Re: Label related compiler error on: February 01, 2013, 01:41:31 am
I thought Nick was joking about asking how to disable the airbags, so I just continued on it.

In the first post I requested an answer to a compiler error, and requested that nobody talk about the downsides of labels and gotos. Well over half the posts have been about something OT from my question, or irrelevant to me finding the answer. I implied right off the bat that labels and gotos are not recommended, which other people reading this thread in the future should have picked up on.

IMO these forums are great for sharing information, and helping people out, but it sure takes from the experience to often have people (seemingly) go out of their way to annoy me, or just troll/spam the thread. I'm not sure how many threads I have started, only to have a majority of the replies be OT from my question(s), or otherwise mostly useless.

I've been within the top three posters on about 4 tech-related forums (each for over a year), since I was about 14 YO, and I can honestly say that the Arduino forums are not a pleasure to use. I go out of my way to avoid these forums, and only post here when I can't find the answer anywhere else, because I know how welcome you make me feel. I really really wish that was not the case smiley-cry

Hopefully next time I post a question here, things will go smoother.
5  Using Arduino / Programming Questions / Re: Label related compiler error on: January 31, 2013, 06:45:42 pm
this is turning into what I explicitly stated I didn't want it to...

I know, but sometimes people ask how to do things, like "how to I turn interrupts off because of blah" and it turns out that the "real" solution is to dissuade them from the thing they were attempting in the first place.

It would be like going to a car manufacturer and asking how to disable the airbags.

"But that's not a good idea," they would say.

"But I want to," you reply.

"But why?" they ask.

"I just want to experiment," you reply. "It will be fun to drive around with them disabled."

Then I'd say "Fine, I'll just pull the fuse" << smiley-lol ... or more likely go online and ask someone who will (hopefully) cut to the chase and actually tell me the answer to what I am asking, instead of telling me all the reasons it's so bad to do it.
6  Using Arduino / Programming Questions / Re: Label related compiler error on: January 31, 2013, 06:11:01 pm
I know that they aren't necessary, but sometimes it's fun to play around with them.

 smiley-roll this is turning into what I explicitly stated I didn't want it to...
7  Using Arduino / Programming Questions / Re: Label related compiler error on: January 31, 2013, 06:06:39 pm
Okay, I guess that makes sense.

I don't think I need to use it. I was simply playing around, and ran into the error.
8  Using Arduino / Programming Questions / Re: Label related compiler error on: January 31, 2013, 05:59:58 pm
Thanks, that does compile, but why would I need to do that (put a semi-colon after the colon)?
Quote
goto LABEL;
LABEL:;

Other than the file name, function name, and line number, the Arduino error messages are almost always useless, so I tend to disregard them.
9  Using Arduino / Programming Questions / Re: Label related compiler error on: January 31, 2013, 05:52:40 pm
Because I don't want this thread to be about the pros and cons of labels and gotos. I want to be able to use them, and I'd like to know why it doesn't work.
10  Using Arduino / Programming Questions / Label related compiler error on: January 31, 2013, 05:35:25 pm
Been looking around, and I didn't find it... Is there a way to prototype a label in C/C++ for Arduino? For some reason Arduino will only "goto" to a label that is formerly declared (higher in the code). It throws errors when you try to goto a later place.

This works:
Code:
LABEL: 
goto LABEL;

This does not work:
Code:
goto LABEL;
LABEL:

Program:
Code:
void setup(){

}

void loop(){
  goto LABEL;
  LABEL:
}

Compiler errors:
Code:
Program.ino: In function 'void loop()':
Program:9: error: expected primary-expression before '}' token
Program:9: error: expected `;' before '}' token

And please do not talk about why labels are bad, or why I should not be using them.
11  Using Arduino / Storage / Re: IDEFat Library for IDE Hard Drive and Mega on: October 30, 2012, 05:49:52 pm
You must understand the HDD IDE protocol, and how HDDs work. What would be the most simple way to actively communicate with a HDD PCB, so that the spindle spins indefinitely? I don't need to access stored data, and it will be physically impossible (I removed the reading head).
12  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 05:54:38 pm
Okay, so I changed the Make and Program tools to use the make.exe program in the "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\utils\bin" directory. The Program tool was complaining with error 1 (which it has done a zillion times in my attempts to get things working again). It seems that the avrdude.exe in "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin" is actually not avrdude.exe, but perhaps a wrapper? avrdude2.exe is apparently what I need, so I renamed both of them, so that avrdude2 is now avrdude, and avrdude is now something it won't recognize.

Now WinAVR seems to be working (I can compile and download a program to an AtTiny85), and the Enhanced Arduino IDE still seems to download code properly to an UNO. I haven't tried much more than that so far.

Thanks for helping me out. I'll report back if I start seeing errors.

BTW, what's the deal with avrdude plus avrdude2?
13  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 04:57:37 pm
I have WinAVR-20100110, and I don't run it from a command prompt (well, rarely I run avrdude from it). I use Programmer's Notepad, which is included with WinAVR, and i use the "Make All" and "Program" "buttons" in the Tools menu of pn.
14  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 04:35:37 pm
I'm not entirely sure what I'm supposed to do to fix the problem.

I ran the command prompt line you posted (after filling in the WinAVR bin location). It seems to have removed the directory "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin" from that registry key I mentioned earlier, but it doesn't seem to help any more than me manually removing it.
15  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1i for Windows (installer, drivers, etc) +SRC on: October 20, 2012, 03:44:50 pm
I've installed WinAVR for programming raw AVRs. I used it for a while, and it worked great. Just recently I attempted to use it again, and it tries to use the AVR tools located in C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin instead of C:\WinAVR-20100110\bin. In doing so, it seems to have broken something, and the WinAVR stuff no longer works properly (things such as "Make All", and "Program"). There shouldn't be any connection what-so-ever between WinAVR and Arduino ERW 1.0.1i. The only thing I could think of is that the computer register system got messed up somehow, so that it looks in the wrong directory. I went to the Registery Editor, location "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" key "Path", and it does indeed include reference to C:\WinAVR-20100110\bin as well as C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin. Something interesting to note, is that it includes no reference to the original Arduino IDE's tools, which are in directory C:\Program Files (x86)\arduino-1.0.1\hardware\tools\avr\bin.

I don't know exactly when/where the problem started. WinAVR was working fine along side of the official Arduino IDE, but I hadn't tried using WinAVR since I installed this enhanced Arduino IDE.

If in the registry key I remove the reference to the Enhanced Arduino IDE and I rename the program folder "Arduino ERW 1.0.1i" to e.g. "__Arduino ERW 1.0.1i", then I can use WinAVR. However, I need to "Make All" twice in order for most of it to succeed (still has an error, something to do with the EEPROM).

Perhaps you can shed some light on this situation.

What all registries does the Enhanced Arduino IDE use?

Can you think of any good solution?

UPDATE: Through some more investigating, it seems that the Enhanced Arduino IDE started using that specific registry key in version 1.0.1c (it didn't seem to in 1.0.1b). It also seems that renaming the program file for the enhanced arduino IDE is all that's needed (to get to the point I'm at now); it doesn't seem that that specific registry key is the (sole?) cause.
Pages: [1] 2 3 ... 9