Show Posts
Pages: [1] 2 3 ... 236
1  Using Arduino / Programming Questions / Re: Is there anything wrong with my code? on: Today at 02:28:51 am
You have changed your code but not posted the new version and it is not possible to help you any further until you do.
2  Using Arduino / Programming Questions / Re: How to get the serial monitor to only show a specific part of what it outputs? on: April 24, 2014, 04:15:41 pm
Code:
Serial.println("459321248800313344");
That is not the real answer, of course, but as you didn't post any of your code I had to make up my own.

Where is the serial output coming from in your program ?
Is the format fixed ?
3  Using Arduino / Programming Questions / Re: Libraries Sometimes Not "Seen" By Compiler on: April 24, 2014, 11:23:08 am
Quote
But does this not then require a lot of extra user file management manipulation when you want or need to upgrade to the next IDE version that comes out? Having 3rd party libraries installed in the user's sketch directory was a much improved upgrade when first implemented and works great and requires no user work when upgrading the IDE.
I have never used the IDE to install a library having always added them manually but if you look further on the page about installing libraries using the IDE it gives an example and says
Quote
The zip file will have been expanded in the libraries folder in your Arduino sketches directory.
So it is where we seem to agree that it belongs.
4  Using Arduino / Programming Questions / Re: simple sketch for switch and relay on: April 24, 2014, 11:14:37 am
Quote
why do you write 
unsigned long fiveMinutes = 5UL * 60 * 1000   ???

I just wrote
unsigned long fiveMinutes = 300000
I wrote the way I did to make it obvious how the 5 minutes was derived, ie 5 times 60 seconds, but it is perfectly acceptable to just assign the total number of milliseconds to the fiveMinutes variable.  Writing it the way that I did also prevents more or less zeroes being typed in the total and avoids my old eyes and brain needing to count them.

5  Using Arduino / Programming Questions / Re: can anybody help with analog read function in this program on: April 24, 2014, 08:49:58 am
Where in heavens name did you get that code ?
Forget modifying it and start again.
6  Using Arduino / Programming Questions / Re: read analog input arduino in visual basic 2010 with ethernet on: April 24, 2014, 04:34:44 am
What is this mysterious error message and where is it coming from ?  Arduino or VB ?

Do you mean that you want to send the value read by the Arduino to VB ?
If so, which part of the Arduino code sends the value read to VB ?
7  Using Arduino / Programming Questions / Re: Rotary Encoder to measure velocity on: April 24, 2014, 04:21:39 am
I think that you will be very lucky to find any ready made code to meet your requirements.  You have obviously tried to read from the encoder.  Please post an example of the program that you tried that caused you to conclude that the Arduino could not keep up with the impulses from the encoder.  A circuit diagram would also be helpful in understanding what you are doing and how.

What do the figures that you quote relate to in respect of the maximum number of pulses to be read in a period and/or the minimum time between pulses ?
8  Using Arduino / Programming Questions / Re: [SOLVED]Problems with triggering timer functions in 'if' staments on: April 24, 2014, 03:02:49 am
I can fully understand your *sigh*
The =/== confusion must be one of the most common mistakes to make.  = is used either accidentally or on purpose because of familiarity with other languages and of course, the code compiles either way so you don't get any immediate indication of the problem.

If only the compiler could understand what you meant rather than what you wrote.
9  Using Arduino / Programming Questions / Re: Problems with triggering timer functions in 'if' staments on: April 24, 2014, 02:27:48 am
Code:
  if(mode = 1)
= is the assignment operator
== is the comparison operator
10  Using Arduino / Programming Questions / Re: Arduino plotting graphs on: April 24, 2014, 01:38:34 am
If the Arduino is reading and transmitting the correct values then you have a question about Processing.  On the other hand if it is not reading and transmitting the correct values then you have an Arduino question, at least in the first instance.  There are people here (not me) that know both Arduino and Processing but naturally the focus here is on the former.

Your questions seem to be about presentation of data, hence Processing.  How far have you got with this project ?  Can you read the sensor values and show them on the Serial monitor, for instance ?
11  Using Arduino / Programming Questions / Re: Help with motion activated servo please. on: April 24, 2014, 01:32:35 am
The page that you link to says
Quote
The regular value without movement is above 1021, upon detecting it, it goes low to 17 - 18.
so your test for greater than 1000 is a bit too close for my liking.  What sort of values do you get for alarmValue using your program ?
12  Using Arduino / Programming Questions / Re: Problem: UDP Wraped with If Statement on: April 24, 2014, 01:24:38 am
Quote
Prints out "Changed" once and after that nothing happens!
So now you know that this
Code:
if ((v1 != IO1DigitalVals[i]) || (v2 != IO2DigitalVals[i]) || (v3 != IO3DigitalVals[i]))
is either only true once or is only executed once.  So put in some Serial.prints to show whether it is executed more than once and the values of the variables being tested by the statement.  Also put some Serial.prints elsewhere in the code to show what code it is actually executing.
13  Using Arduino / Programming Questions / Re: Arduino plotting graphs on: April 23, 2014, 04:37:05 pm
Is this a question about the Arduino or Processing ?
14  Using Arduino / Programming Questions / Re: Programming Arduino to pick apart numbers vs strings? on: April 23, 2014, 04:32:45 pm
Quote
Is there a way to write programming to make the Arduino see the D first and then the rest of the data and say hey, He said D, so down. or possibly D123 where down by a value of 123?
Yes, why wouldn't there be ?

Picking out single characters when the program knows what to expect (U or D for instance) is easy.  Keep reading until you find something that matches what you expect.  Then either read a fixed number of bytes which hold the number or read until an 'end of message' marker, such as Carriage Return or Linefeed is found and extract the number from the bytes read.  There are even functions such as Serial.parseInt() which make it easier.
15  Using Arduino / Programming Questions / Re: Help with motion activated servo please. on: April 23, 2014, 12:34:34 pm
Quote
Can you see where your code differs from this ?
It doesn't need fixing.
Read the source.
I have read it and see your point (and have learnt something), but I wonder if the OP knows what it is doing.  Seeing the numbers involved in the code that he posted I did wonder if one of the things that he had tried was writeMicroseconds() at some time and had not changed the parameters when changing to write().

Incidentally, I wonder why the auto-switch to writeMicroseconds() is not mentioned in the reference pages.
Pages: [1] 2 3 ... 236