Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 288
61  Using Arduino / Programming Questions / Re: Missing Ping Library Among Other Things in Code PLEASE HELP on: August 24, 2014, 02:06:16 pm
It would have helped if you posted the error.  When I try to compile your program I get
sketch_aug24a:2: error: 'Tone' does not name a type
sketch_aug24a.ino: In function 'void setup()':
sketch_aug24a:28: error: 'tone1' was not declared in this scope
sketch_aug24a.ino: In function 'void loop()':
sketch_aug24a:44: error: 'tone1' was not declared in this scope
sketch_aug24a:45: error: 'tone1' was not declared in this scope
None of the errors has anything to do with ping.

Do you have Tone.h on your system and if so where is it and what is in it ?
62  Using Arduino / Programming Questions / Re: Serial print and millis does not work as it is intended on: August 23, 2014, 01:45:57 pm
//serial print will show data
  Serial.print("pot = " );
  Serial.print("\t  led = ");
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > interval);
 //save the last time message was printed
 previousMillis = currentMillis;

You need to move the printing into the code executed if the timing interval has passed and also fix the problem with this line
if (currentMillis - previousMillis > interval);
The semi-colon ends the code executed if the test is true so as it stands nothing will happen whether the test is true or false.
63  Using Arduino / Programming Questions / Re: Arduino IDE Literal words: PRESSED why is it blue text? on: August 23, 2014, 12:43:57 pm
In library folders you will often find a file named keywords.txt which contains a list of key words pertaining to the library.  The contents of these files cause words in the IDE to be coloured to make them stand out as keywords.  However, the mechanism is useless because the colour coding is picked up whether or not you have included the library in your program.

In your case the word PRESSED must be in a library keywords.txt file on your system.
64  Using Arduino / Programming Questions / Re: Problem retriving value from a Switch case on: August 23, 2014, 04:23:33 am
In terminal when I give " 1 " it gives me

Enter a correct value
Enter a correct value
You are seeing the ASCII value of the digit 1 followed by the ASCII value of a linefeed which is presumably how you have the serial monitor line ending set.

Now that you know what you are getting from serial you can change your switch/case to suit or subtract 48 from the incoming byte value after reading it and leave the switch/case alone.
65  Using Arduino / Programming Questions / Re: Problem retriving value from a Switch case on: August 23, 2014, 03:46:24 am
  int sv =;
What type of variable does 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 ?
66  Using Arduino / Programming Questions / Re: char and int issue on: August 23, 2014, 03:22:30 am
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.
67  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.
68  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 ?
69  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
70  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 ?

71  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.
72  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.
73  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.
74  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.
75  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. 
Pages: 1 ... 3 4 [5] 6 7 ... 288