Show Posts
Pages: 1 [2] 3 4 ... 285
16  Using Arduino / Programming Questions / Re: Error message when trying to verify Tone tutorial : on: August 22, 2014, 04:35:05 am
What am I doing wrong?
Using a Mac ?  smiley
More seriously, using a build of the IDE that may not be stable.  The code compiles OK for me on a PC using IDE versions 1.0.5 amd 1.5.6-r2

Try an earlier version of the IDE or reinstall the once you have.
17  Using Arduino / Programming Questions / Re: Input Disable Untill Point in Program on: August 22, 2014, 01:20:52 am
As with your other thread about relays that I read the question is difficult to understand.
An input will not "go high", rather an external signal will make it high.  What is it that will take the input high ?  A switch maybe ?

Can you please be more specific in your requirement.
18  Using Arduino / Programming Questions / Re: Internal Relay??? concept?? application in arduino on: August 21, 2014, 04:40:57 pm
Would it be possible to have the question again please, but this time in English ?
Please post all of your program, use code tags and take out all the unnecessary blank lines.

Incidentally, giving pins names such as PinSeven and PinEight is not helpful in the least.
19  Using Arduino / Programming Questions / Re: Incrementing array steps on: August 21, 2014, 03:09:37 pm
digitalWrite(A5, HIGH);
can't increment, but a variable could.  Initialise the variable to 0, then every time you execute the digitalWrite(); increment the variable.
20  Using Arduino / Programming Questions / Re: Why no servo movement? on: August 21, 2014, 12:08:53 pm
The problem is that while the photoCell value exceeds 60 the only code that will be executed is that between the braces of the while loop and that does not include any servo commands.

If you need to do things that depend on whether the light is on or off then set a boolean variable to true when the light is on and false when it is off then test its value before executing code that depends on its value.

You have potential problems with your timing variables too.  All of them should be declared as unsigned long as they can never be negative. 
21  Using Arduino / Programming Questions / Re: Why no servo movement? on: August 21, 2014, 11:15:10 am
Can someone help me to understand why I am not getting servo movement while my photocell is in light?
Perhaps because the program is stuck in this while loop
  while(analogRead(photoCell) > photoValue)
  {      //Suspends LED program while the photocell is in light
    digitalWrite(ledOne, LOW);
    digitalWrite(ledTwo, LOW);
    previousTimeS = millis() - 600000;
    previousTimeL = millis() - 240000;
22  Using Arduino / Programming Questions / Re: millis inside while on: August 21, 2014, 10:58:21 am
while(val > 60); //while light is still on
//while val (which never changes) is greater than 60
23  Using Arduino / Programming Questions / Re: Display line numbers in IDE editor version 1.0.5 ? on: August 21, 2014, 10:32:43 am
Nothing in preferences.txt  and Google did not help either..
Looks like no then....

If line numbers are important to the way that you work you could always use an external editor for which there is an option in File/Preferences
24  Using Arduino / Programming Questions / Re: [SOLVED] Nested IFs - a quick check would be appreciated on: August 21, 2014, 08:25:30 am
I'm still very far from a compilable version of the code - by the time I'll compile the program, it will be much bigger,
My advice would be to stop right now and create a version that compiles even if it calls functions that do nothing or perhaps return fixed values that will vary in the final version. 

Do not continue without testing sections of the program until you have written it all or you will regret it.
25  Using Arduino / Programming Questions / Re: Weird program behaviour when using interrupts on: August 21, 2014, 06:21:35 am
const unsigned long delayDataBroadcast = 9333;//How often should the RF codes be rebroadcasted in ms
This looks like a very magic number....

Do you actually need to broadcast the data every 9333 milliseconds or could you do it only when currentPower and/or DailyProd have changed ?
26  Using Arduino / Programming Questions / Re: Compiling USB shield on: August 21, 2014, 06:10:31 am
Thanks for the error messages. 
Please post the whole program that you are trying to compile as I can't work out what it is from the link that you gave in your first post.
27  Using Arduino / Programming Questions / Re: Weird program behaviour when using interrupts on: August 21, 2014, 04:32:53 am
If the code that you posted is all that the Arduino is doing then do you actually need to use an interrupt at all ?  Could you not simplify things by polling the input pin ?

How long do the kWh pulses last ?  Unless you are consuming vast amounts of power then I assume that they don't occur very often.
28  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 04:25:16 am
You need to increment the index variable when the button becomes pressed, not when it is pressed.  Look at the state change detection example in the IDE to see how to do it.

Also consider using
pinMode(menuBut, INPUT_PULLUP);
to activate the internal pullup resistor and remove the external pull down resistor if you have one, which I suspect you don't, and wire the button to pull the pin low when pressed.  This will ensure that the input is always at a known voltage and not floating between 0V and 5V.  Note that when you do this you will need to invert the logic of the test to see whether the button is pressed.
29  Using Arduino / Programming Questions / Re: Can I have an advice for "Bounce"? on: August 21, 2014, 01:55:12 am
"Bounce" dose not name a type
It sounds like you have the library installed in the wrong place or with the wrong name or did not stop and restart the IDE after installing it.

The library folder named Bounce should be placed in the libraries folder of your sketch folder.  There should be a file named Bounce.h in the folder and possibly one called Bounce.cpp.  The filenames must match the folder name exactly.

Please post your program as it is also possible that you are not including the library properly.
30  Using Arduino / Programming Questions / Re: Compiling USB shield on: August 21, 2014, 01:14:16 am
I can't get it compile at all.
and the full error message is ........... what ?
Pages: 1 [2] 3 4 ... 285