Show Posts
Pages: 1 [2] 3 4 ... 285
16  Using Arduino / Programming Questions / Re: Problem retriving value from a Switch case on: August 23, 2014, 03:46:24 am
Code:
  int sv = Serial.read();
What type of variable does Serial.read() return ?
To see what value you are actually getting, if any, try printing sv after you have read it.  Does it match any of the values that you are testing for in switch/case ?
17  Using Arduino / Programming Questions / Re: char and int issue on: August 23, 2014, 03:22:30 am
Quote
If the UID of the card is something like "CD D2 F8 FE" then thats a mixture of int's and char's,
It looks like you need to do some reading up on hexadecimal representation of numbers, because that's what each of the values in the string you quoted look like to me.
18  Using Arduino / Programming Questions / Re: How to control domotiga by database sqlite ? on: August 23, 2014, 03:17:49 am
If I have understood you correctly domotiga (whatever that is) is connected to the Pi.
If that is the case then why are you asking this question in an Arduino forum ?
If I have misunderstood then please explain in more detail how the Arduino is involved with domotiga.
19  Using Arduino / Programming Questions / Re: Efc was not declared in this scope. on: August 23, 2014, 01:15:41 am
Which board have you got selected in the IDE ?
20  Using Arduino / Programming Questions / Re: saving changes to sketches on: August 22, 2014, 12:45:04 pm
Where are you trying to save the programs ?

Mine go into C:\Users\Bob\Documents\Arduino which is set in File/Preferences
21  Using Arduino / Programming Questions / Re: LOW edge from 0V on: August 22, 2014, 08:19:42 am
How long is the LED stay on during each time through loop() ?
How long is the LED stay off during each time through loop() ?
What is the ratio of off to on ?

22  Using Arduino / Programming Questions / Re: Error message when trying to verify Tone tutorial : http://arduino.cc/en/Tutor on: August 22, 2014, 04:35:05 am
Quote
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.
23  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.
24  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.
25  Using Arduino / Programming Questions / Re: Incrementing array steps on: August 21, 2014, 03:09:37 pm
Code:
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.
26  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. 
27  Using Arduino / Programming Questions / Re: Why no servo movement? on: August 21, 2014, 11:15:10 am
Quote
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
Code:
  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;
  }
28  Using Arduino / Programming Questions / Re: millis inside while on: August 21, 2014, 10:58:21 am
Code:
while(val > 60); //while light is still on
//while val (which never changes) is greater than 60
29  Using Arduino / Programming Questions / Re: Display line numbers in IDE editor version 1.0.5 ? on: August 21, 2014, 10:32:43 am
Quote
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
30  Using Arduino / Programming Questions / Re: [SOLVED] Nested IFs - a quick check would be appreciated on: August 21, 2014, 08:25:30 am
Quote
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.
Pages: 1 [2] 3 4 ... 285