Show Posts
Pages: 1 ... 78 79 [80] 81 82 ... 236
1186  Using Arduino / Programming Questions / Re: PCIFR question on: December 06, 2013, 04:49:28 pm
Why all the faffing around with interrupts ?
Poll the switch each time through loop() and debounce the input in software.  There is even an example in the IDE.
1187  Using Arduino / Programming Questions / Re: Basic Timer Problem on: December 06, 2013, 07:20:05 am
timer should be declared as an unsigned long
1188  Using Arduino / Programming Questions / Re: Return doesn't return data! help please on: December 05, 2013, 03:44:00 pm
Quote
a local global variable not heard of that, probably why ive steered away from C etc in the past! Assembler is sooo much easier to thinkout!
That was a typo on my part.  No wonder you were confused.  It should have said "both a global and local variable named DataNo, but who knows ?"

1189  Using Arduino / Programming Questions / Re: Return doesn't return data! help please on: December 05, 2013, 01:54:37 pm
Quote
Basically the code ive shown is the only locations where DataNo exist.
So where is DataNo set to anything except "" ?
1190  Using Arduino / Programming Questions / Re: Making an array to control led on: December 05, 2013, 01:48:13 pm
Quote
Code:
if(Timer >= 300 && Timer <= 400)
{
  LedCont [] = {0,1,0,1,1,1,1,0,0,0,1};
}
Just gives me errors
That's because you can't initialise a whole array like that except when it is first declared.
1191  Using Arduino / Programming Questions / Re: Return doesn't return data! help please on: December 05, 2013, 01:43:04 pm
Code:
        Serial.println(DataNo);              // checking that the data exist here and it does
        return;
Will this return DataNo I wonder ?
Without seeing a substantial proportion of your code, if not all of it, it is impossible to say what is causing the problem.  For instance, you could have both a global and local global named DataNo, but who knows ?
1192  Using Arduino / Programming Questions / Re: Speedometer School Project Code Not Working on: December 05, 2013, 01:24:02 pm
Code:
  knobValue / numLEDs = mySpeed;
You can't have a calculation on the left side of an assignment.  It would be like saying
Code:
10 / 2 = 3
1193  Using Arduino / Programming Questions / Re: Return doesn't return data! help please on: December 05, 2013, 11:30:36 am
Quote
so i go back to the function that called this one and try Serial.print( DataNo) and i dont get anything
If you do not get a value for DataNo from the function that calls the one you posted a section of then it is surely no surprise that you do not get anything returned from here is it ?

Where does DataNo derive from ?  Can you share that portion of code ?
1194  Using Arduino / Programming Questions / Re: Help with arduino weather project on: December 05, 2013, 06:35:40 am
Posting your whole code is good.  Using code tags is even better.

Does you program ever call the serialEvent() function ?
1195  Using Arduino / Programming Questions / Re: Help with arduino weather project on: December 05, 2013, 04:23:37 am
It would help considerably if you followed the advice in http://forum.arduino.cc/index.php?topic=97455.0, put the code in code tags, eliminated superfluous blank lines and used the Auto Format tool in the IDE.
1196  Using Arduino / Programming Questions / Re: PID name does not exist on: December 05, 2013, 04:14:59 am
At last.  Code that actually tries to use the PID library.
Your library appears to be in the right place but
Quote
I changed the file name to PID
why ?
Change it back to match the name in the #include.  That is how the IDE know where to find it.
1197  Using Arduino / Programming Questions / Re: PID name does not exist on: December 05, 2013, 02:20:40 am
Please post the code that gives the error and confirm the name and exact location of the PID library folder.
1198  Using Arduino / Programming Questions / Re: USE PID CONTROL DC MOTOR SPEED on: December 05, 2013, 02:14:12 am
hi

My IDE version arduino 1.0.5 . I already copy the file PID_v1 and extract at library still giving the same error PID does not name as type.Need your advice thank you.
But the code posted does not use the PID library.  Have you perhaps got another version that does use the library that gives the error ?  Where exactly did you install the library folder ?
1199  Using Arduino / Programming Questions / Re: State machines on: December 05, 2013, 02:08:37 am
Quote
To be honest with you guys, I kind-of like my diagram:
So do I.
Formal state diagrams are fine but a table will be more familiar to most people and therefore more likely to be used.
1200  Using Arduino / Programming Questions / Re: USE PID CONTROL DC MOTOR SPEED on: December 04, 2013, 04:42:58 pm
That code compiles for me. 

The error that you quote is usually caused by a library being installed incorrectly, not being #included correctly or the IDE not being restarted after the library installation.  As you are not actually using the PID library in your code that is not the cause here. 

What version of the IDE are you using ?
Pages: 1 ... 78 79 [80] 81 82 ... 236