Show Posts
Pages: 1 [2] 3 4 ... 3235
16  Using Arduino / Programming Questions / Re: Due: Smallest address where instantiated objects might be stored in memory? on: July 11, 2014, 11:57:16 am
Quote
I meant it to be:
And that differs how?
17  Using Arduino / Programming Questions / Re: Noob creating a library, very little idea on howto (1st Library) on: July 11, 2014, 11:55:42 am
Code:
  TEST::MRESET(int pin)
  {
  pinMode(pin1, OUTPUT);
  _MRESET = pin1;
  };
Does this even compile? The argument is pin. The variable in the code is pin1.

By convention, all upper case names are constants. Method names are NOT constants.

What seems to be the problem?
18  Using Arduino / Programming Questions / Re: Due: Smallest address where instantiated objects might be stored in memory? on: July 11, 2014, 11:42:33 am
Quote
So, for example, can you write code like this?
There is nothing syntactically wrong with that code, but it is useless. It is not looking at the address of myObject.
19  Using Arduino / Programming Questions / Re: Operations between two SD files on: July 10, 2014, 05:54:56 pm
Quote
I've been read about getting numbers from SD card, but I couldn't figure it out yet.
Write a function that takes a file pointer, and returns a value. Get that function to work (using Serial.print() to debug it). Then call that function to get a value from the first file. Call it again to get a value from the second file. Do whatever voodoo you want with the numbers.

You know where a number starts (after the last delimiter (or the beginning of the file)). You know where a number ends - at the delimiter or the end of the file. You know that the number is stored as a series of characters, so read all the characters until you find a delimiter or end of file. Convert the NULL terminated array of chars to a value using atoi(), atof(), strtoul(), etc.
20  Using Arduino / Programming Questions / Re: Error after adding a few extra line, probably something REALLY simple on: July 10, 2014, 05:49:22 pm
Quote
You're missing curly braces, and apparently aren't familiar with the concept of them, judging by the code.
Missing them? There are useless ones all over the place.

Sticking in an extra curly brace when something fails to compile is NOT the solution. Use curly braces only where needed - to start and end a function and to start and end a block after an if statement, for loop, while statement, or do/while statement.

Get rid of ALL of the others.
21  Using Arduino / Programming Questions / Re: Serial data - Clear terminal Window on: July 10, 2014, 05:26:59 pm
Quote
Can you clarify on this?
Sure. As soon as you define what serial monitor application you are going to be using, in what mode (VT50? VT100? VT200?).
22  Using Arduino / Programming Questions / Re: Time.h compiling error on: July 10, 2014, 05:23:45 pm
Quote
However, for the sake of completeness, here is the full code of my "test" project, straight from the web.

For the sake of completeness, I compiled your code using 1.0.5 for the Arduino Uno. Here are the error messages I get:

Quote
Binary sketch size: 4,390 bytes (of a 32,256 byte maximum)

Now, perhaps you could strive for completeness.
23  Using Arduino / Programming Questions / Re: Displaying Data on Serial Monitor using Xbee, Sensor, and Lilypad Simple board on: July 10, 2014, 05:15:05 pm
Quote
Am I using this piece of code correctly?
Yes. Though one usually uses print() for character data. But, the print() method ends up calling the write() method, so what you have works.
24  Using Arduino / Programming Questions / Re: State machine modeling on: July 10, 2014, 06:08:25 am
Quote
The sales men were forever coming back with even more weird situations.
There's a solution for that. Stop satisfying their every whim.
25  Using Arduino / Programming Questions / Re: Displaying Data on Serial Monitor using Xbee, Sensor, and Lilypad Simple board on: July 10, 2014, 06:05:40 am
These:
Quote
   Rx  -->  pin 6
   Tx -->   pin 5
and
Code:
SoftwareSerial xbee(5,6); //Rx, Tx
don't seem to agree.

Try swapping the wires or the values in the call.
26  Using Arduino / Programming Questions / Re: Arduino to Pololu Micro Maestro serial connection on: July 10, 2014, 06:02:13 am
Quote
In the loop, Is there a way to add a potentiometer instead of the defined 180 degree rotation?
Of course.

Quote
Help would be appreciated, thanks.
Help with what? Reading an analog pin? That's trivial. Map() the value to a servo range? That's trivial. Calling the function with a variable instead of a hard-coded value? You've got to be kidding.
27  Using Arduino / Programming Questions / Re: Library installation and use on: July 10, 2014, 05:58:28 am
Quote
I have tried to use SipHash library, however I get the following error when trying to run the example code
So, somehow, you have concluded that you have installed the library incorrectly?

No links == no help.

Quote
Btw, I use Intel Galileo, not Arduino. If that changes anything for this case.
Perhaps you should ask at http://www.Ford.com for help with your Chevrolet.
28  Using Arduino / Programming Questions / Re: Gesture Control Car Using MPU6050+nRF24l01 (Help me, quickly!) on: July 10, 2014, 05:54:20 am
Quote
in my problem i want to send the readings of MPU6050 by using nRF24l01
Yeah, yeah. We get that.

Quote
but i can not understand how make that cord
What cord? Is that supposed to be code?

Quote
because i am new to arduino..
No, it's because you saw a pool and jumped in the deep end.

Can you send ANYTHING, using ANY code, from one radio to the other?
29  Using Arduino / Programming Questions / Re: Displaying RTC (DS1307) date and time on LCD on: July 10, 2014, 05:49:43 am
Quote
Plus, every time i upload the sketch, the time would keep override, will this wear out the RTC?
No. But, since you have an RTC, why do you need to keep changing the time? Comment out that line.

Quote
I've tried different ways of code (I'm bad at coding) but still couldn't get the values display on the LCD, it just shows zero and some weird patch on the screen.
Is the problem with getting the data onto the LCD, or with getting the data? In other words, what does your serial output look like?

Why do you have global variables named hour, minute, second, etc. AND local variables in the stupidly-named printDate() function?
Stop that shit NOW!
30  Using Arduino / Programming Questions / Re: Display HH:MM:SS? on: July 10, 2014, 05:44:33 am
millis() reports the number of milliseconds since the Arduino restarted. It has NOTHING to do with what time it is now.

You are barking up the wrong tree.
Pages: 1 [2] 3 4 ... 3235