Show Posts
Pages: [1] 2 3 ... 290
1  Using Arduino / Programming Questions / Re: QLOCKTWO project on: Today at 06:12:51 am
The code exceed the mas characters so please use the top imgur link
Why not attach the code to your post using the Additional Options.. link at the bottom left of the edit window ?  We cannot copy an image into the IDE to see the program fully, edit it or copy from it.
2  Using Arduino / Programming Questions / Re: Ignoring IF statment. on: Today at 04:49:40 am
The trailing semi-colon is your problem.  It is the only piece of code executed if the test is true.
Check out the Arduino reference for the syntax of the if command.
3  Using Arduino / Programming Questions / Re: i want to know how to write this syntax on: September 20, 2014, 04:18:37 pm
What is this meant to be ?  Bit 7 of PINC perhaps ?  Please clarify what you are trying to do.
4  Using Arduino / Programming Questions / Re: How to read 500 readings from analog input block in 1 second in simulink? on: September 20, 2014, 05:11:41 am
I am using simulink as it can convert the blocks in simulink into c conde and burn it into the arduino, without actually writing any code.
Except when the simulation program won't do what you want....

It sounds like you are going to have to write some code yourself.  I assume that what you are calling a vector is an array.  It seems odd that Simulink only allows a one element one dimensional array as that is about as much use a a chocolate teapot and might just as well be a normal variable. 

What sort of data do you want to store ?  If they are ints them a 500 element array will use half of the memory available on a Uno, which is not a good start.  What sort of manipulation do you want to do on the Arduino and how will the results be output ?
5  Using Arduino / Programming Questions / Re: ReadASCII String Example Problem on: September 19, 2014, 02:07:08 am
What do you see on the Serial monitor ?
What have you got the line ending set to in the Serial.monitor ?
6  Using Arduino / Programming Questions / Re: Problems with strings and &chars on: September 18, 2014, 04:22:23 pm
//error: 'string' does not name a type"
The error message is telling you exactly what is wrong.

Is string a valid data type in C++ ?
7  Using Arduino / Programming Questions / Re: Variable "A" control the state of 2 to ? on: September 18, 2014, 11:19:38 am
Can I use multiple arguments, something like...
One of the things that I like most about the Arduino is that it is so easy to try ideas out .....
8  Using Arduino / Project Guidance / Re: avoiding delay on: September 18, 2014, 11:15:28 am
Look at the BlinkWithoutDelay example in the IDE
9  Using Arduino / Programming Questions / Re: has not been declared on: September 18, 2014, 08:17:05 am
Thanks for reading my post.
In the first part are MyToolBox.h.
I put it in attachement too, and Arduino code.

Thanks and bast regards.
I see references to MyToolBox.h in this thread but I do not see it #included in your program.
10  Using Arduino / Programming Questions / Re: has not been declared on: September 18, 2014, 07:31:40 am
I can't see MyToolBox.h being #included  in your program.  Might that be a problem ?

In future please use code tags when posting programs as it makes them so much easier to read.  You will, of course, have read
11  Using Arduino / Programming Questions / Re: Set on closed loop controller on: September 18, 2014, 06:26:55 am
The answer to your question depends on several factors including

How fast is the variable changing ?
What range of values does it vary over ?
Can the other system output the "variable" as a voltage ?
Is the data being processed on the Arduino in real time as it arrives or periodically depending on time ?

More details of what you are doing would help formulate an answer.

12  Using Arduino / Programming Questions / Re: Encoder code stops perfect one way, not the other? on: September 18, 2014, 04:48:31 am
    tempKnob.write (200);            //write encoder to 200 gets divided by 4 in byte "t"
the idea is that it will not allow "T" to go below 50.

Using that logic
would not let it go below 100

Are you sure that
tempKnob.write (200);
is not setting the maximum temperature ?
13  Using Arduino / Programming Questions / Re: Encoder code stops perfect one way, not the other? on: September 18, 2014, 02:40:51 am
I would be suspicious of this line
    tempKnob.write (200);            //write encoder to 200 gets divided by 4 in byte "t"
What does it do exactly and what does the parameter mean ?
14  Using Arduino / Programming Questions / Re: PERSISTANT PROBLEMS TO COMPILE NEWPING SKETCH on: September 18, 2014, 01:26:54 am
Please post a copy of the error messages here.

Start fixing the errors by declaring the 3 variables used in this line of code
NewPing sonar(trigger_pin, echo_pin, max_in_distance); 

Formatted more sensibly your setup() function looks like this
void setup()
I suspect that you have ended it sooner than you intended because the code after it is not in a function.

As written your code is hard to read.  Try Auto Format but you will find that it will not work but it will give you a clue to at least one problem.  I suggest that you put each { and } on its own line and leave a blank line between functions to make it easier to read.  Then put the cursor after an an opening brace and look at the closing brace that the IDE indicates.  Do the pair of braces surround the block of code that you intended ?
15  International / Portugues / Re: Dúvida de código para contagem de pulsos on: September 17, 2014, 03:01:25 pm
You are adding 1 to the variable when the button IS pressed.  What you need to do is to add 1 to the variable when the button changes from being NOT PRESSED to PRESSED.  Look at the StateChangeDetection example in the IDE to see how to do it.

Pages: [1] 2 3 ... 290