Show Posts
Pages: 1 ... 42 43 [44] 45 46 ... 231
646  Using Arduino / Programming Questions / Re: IR Recoder and Playback on: February 04, 2014, 02:52:20 am
I think the normal response to posts like this "Permission granted"

What have you tried so far ?
647  Using Arduino / Programming Questions / Re: Discover Arduino on: February 03, 2014, 01:53:14 pm
Quote
I just put 2 voltage generator in the analog inputs. I change the voltage of its between 0 and 5V to test the if().
You do not say what form these voltage generators take but do they have a common GND with the Arduino ?
648  Using Arduino / Programming Questions / Re: Limiting Motor Action on: February 03, 2014, 05:42:39 am
You need to update the value of Actual each time you move, otherwise whatever it is that you are moving will keep going in the same direction once it starts.
649  Using Arduino / Programming Questions / Re: problem in understanding the programme on: February 03, 2014, 03:58:15 am
The library code is available for you to view/edit from the libraries folders.  Personally I use an external editor to do this as I find it more convenient.
650  Using Arduino / Programming Questions / Re: Limiting Motor Action on: February 03, 2014, 03:03:46 am
I stopped looking too hard when I saw this
Code:
void loop()
{
void actuate(){
as the code would obviously not compile.  Did you write this code ?
651  Using Arduino / Programming Questions / Re: Delay function in a subroutine on: February 03, 2014, 02:34:27 am
Quote
(other than the "setup" or "void" functions).
Can you expand on this ?  I do not understand what you mean in the context of your question.
652  Using Arduino / Programming Questions / Re: Limiting Motor Action on: February 03, 2014, 02:11:27 am
The basic idea of your program as posted seems OK, apart from the fact that it does not compile, that is.
653  Using Arduino / Programming Questions / Re: Misdirected bug? on: February 02, 2014, 12:16:58 pm
Quote
The preprocessor ran, saw #defene, had no rules to govern what to do with that directive, so it discarded the name and value.
but not before telling you with an error message
Quote
error: invalid preprocessing directive #defene
654  Using Arduino / Programming Questions / Re: Blink sketch random // solenoid on: February 02, 2014, 09:58:17 am
I did this but didn't work.

Code:
int snelheid= random(500,1000); //speed
int sol=13;  //pwm output

void setup(){
}

void loop(){
digitalWrite(sol, snelheid);
delay(1000);
}
What values does digitalWrite() normally take as its second parameter ? 
How many different states can a digital pin be in ?
 What is the default state of a digital pin when it has not been set by pinMode() ?

All of these questions are relevant to your code not working, at least in the way that you expect.
655  Using Arduino / Programming Questions / Re: how to move a servo to a definite position as taken from serial on: February 02, 2014, 03:16:27 am
http://bit.ly/1bjor1W Will find you details of how to input the number.  The servo bit is easy after that.
656  Using Arduino / Programming Questions / Re: Help coding two sensors triggering LEDS on: February 02, 2014, 02:23:29 am
Loosing the == true part would be even better...  smiley-cool
Whilst that is true, I would be more in favour of that if the boolean variable were a verb, which would make it more readable so it would become, for instance
Code:
if (climbing)
Sometimes it is the small things that make a difference to understanding what is going on.
657  Using Arduino / Programming Questions / Re: timers for HOURS without RTC. Need help. on: February 01, 2014, 05:00:20 pm
Code:
button_function.button
Is this meant to be a reference to an array called button_function with an index of button, or something else ?
658  Using Arduino / Programming Questions / Re: Entering a function on: February 01, 2014, 04:49:17 pm
Where is the looping structure in the loopy() function.  It runs.  It exits.  That's it.
659  Using Arduino / Programming Questions / Re: How can I set up to use an internal interrupt? on: February 01, 2014, 04:44:33 pm
Quote
I wonder if I explicitly re-enable global interrupts with sei(); or interrupts(); before the serial print whether that would work, just to let me do that check. Otherwise I'm completely stuck.
Sounds like a very bad idea.  How about updating a global volatile variable inside the ISR and checking whether it has changed outside the ISR ?  If it changed then the ISR was triggered and the correct routine was run.
660  Using Arduino / Programming Questions / Re: timers for HOURS without RTC. Need help. on: February 01, 2014, 04:39:43 pm
Code:
  if (runTime.outlet <= nowTime - lastTime.outlet)
If you are trying to refer to elements in the arrays then you need something like
Code:
  if (runTime[outlet] <= nowTime - lastTime[outlet])
Time to read up on arrays, methinks.

Quote
Then I remembered I can do this "trick" where I can have "arrays", or from the errors above:  CLASSES.
So I started to re-write the code with CLASSES, or as I would like to call them:  arrays (for now, anyway).
Feel free to call them arrays, because that is what they are.  The reference to classes in the errors is because you have used the wrong syntax (see above).
Pages: 1 ... 42 43 [44] 45 46 ... 231