Show Posts
Pages: 1 ... 2119 2120 [2121] 2122 2123 ... 3080
31801  Topics / Science and Measurement / Re: bidirectional serial communication:simultaneous sensor readout and motor control on: October 03, 2011, 09:59:08 am
Quote
In a second step I managed to read the sensor data seperately and continuously but could not include the motor control.
Is this because acqui() never returns?
31802  Using Arduino / Programming Questions / Re: library hierarchy, inheritance on: October 03, 2011, 09:47:56 am
Code:
unsigned long lerpColorRGB(unsigned long c1, unsigned long c2, float amt)
Isn't lerpColorRGB() supposed to be a class method?
Code:
unsigned long Effect::lerpColorRGB(unsigned long c1, unsigned long c2, float amt)
31803  Using Arduino / Networking, Protocols, and Devices / Re: send data from vb.net 2005 to microcontrolador on: October 03, 2011, 09:06:35 am
Quote
the point is communicate with your arduino from the vb.net application (send the number and the MSG from my application via serial to arduino
That is not what this says:

Quote
Hi, someone know of a source code vb.net 2005 to send and receive SMS data

Sending serial data from a VB app does not depend on whether you are using VB.2005 or VB.2008.
31804  Using Arduino / Networking, Protocols, and Devices / Re: XBee Issues on: October 03, 2011, 09:03:23 am
Quote
I know this because the Xbee shield noted above has an LED attached to the DIO5 pin.
Sparkfun's stuff is generally pretty good, but the "information" on their site often lacks clarity (or any resemblance to reality). The LED that is flashing for you is the Associate LED. It blinks at (supposedly) different rates to indicate when the XBee is paired with another XBee, or is seeking another XBee to pair with.

The USB explorer and the XBee Explorer Regulated serve the same purpose. The USB Explorer is easier to connect to the PC, since it comes with a mini USB connecter and cable. Use that device to program the XBees, and leave the UNO as delivered (with chip in place).

31805  Using Arduino / Programming Questions / Re: library hierarchy, inheritance on: October 03, 2011, 08:54:46 am
The constructor for the Effect class does not actually create an instance of the class that it inherits from. So, you can not use the members of that class.

The Effect::Effect() method needs to create an instance of the ColourPalette class.

Code:
Effect::Effect() : ColourPalette()
{
  // Whatever the Effect constructor needs to do.
}
31806  Using Arduino / Programming Questions / Re: Need help with millis function on: October 03, 2011, 08:48:00 am
Quote
the purpose is for, when I load up or down on the client, the blind window needs 15 seconds (HIGH) to totally open or close.
You need to record when the pin goes HIGH, every time the pin goes HIGH, not just if the pin has not been HIGH for 15 seconds.
31807  Using Arduino / Programming Questions / Re: get out from a loop on: October 03, 2011, 08:06:32 am
You can use the break; command to get out of a while loop (or any other kind of loop).
31808  Using Arduino / Interfacing w/ Software on the Computer / Re: help making a class on: October 03, 2011, 08:04:29 am
Quote
is there a procesing forum?
Yes, there is.
31809  Using Arduino / Programming Questions / Re: Can someone tell me what I am doing wrong? on: October 03, 2011, 07:37:35 am
Quote
I usually only use brackets for multiple things like:

if (1 = 1) (doSomething());
You can't assign a value to a literal. The ()s around doSomething() are not needed, and look like you don't know what you are doing. Stop using them. Period.

Curly braces, on the other hand, should be used for every block, needed or not. It makes it easier to add code to a block when the { and } are already there.
31810  Using Arduino / Programming Questions / Re: Need help with millis function on: October 03, 2011, 07:33:48 am
What is the purpose of testing how long it has been since previousMillis was set?

You want to set some variable (previousMillis is marginal; the name should be something like pinOnTime) when the pin is turned on.

Then, after the block that turns the pin on (the if(client) {} block), have an if block that turns the pin off.
Code:
if(luzCozinhaON && millis() - previousMillis > 15000)
{
   // Turn the pin off and set luzCozinhaON to false
}
31811  Using Arduino / Programming Questions / Re: Need help with millis function on: October 03, 2011, 06:53:33 am
Whenever you receive "L7=UP" in the request, you turn the luzCozinha pin on, set luzCozinhaON to true, and if it has been more than 15 seconds since you last set previousMillis, you set it again.

There is nothing magic about setting previousMillis. At some point, you need to write the code that compares previousMillis to "now" and turn the luzCozinha pin off.

Where is that code?
31812  Using Arduino / Project Guidance / Re: softwareSerial issue on: October 03, 2011, 06:28:17 am
Quote
The problem is that third step actually does not happen
Why not? If you want us to look at your code, you need to clean your screen.
31813  Using Arduino / Project Guidance / Re: Cheap GPS car alarm? on: October 03, 2011, 06:11:09 am
Quote
As putyn suggested, maybe it is possible to use phone bluetooth, to do the same?
Suppose you leave your phone in the car, for a day at the beach. What happens when your car leaves without you?
31814  Using Arduino / Programming Questions / Re: Need help with millis function on: October 03, 2011, 06:07:24 am
Put each { and } on its own line. Use Tools + Autoformat to format your code, then post it again. It is nearly impossible to read that poorly indented (and possibly incorrectly nested) code.
31815  Using Arduino / Networking, Protocols, and Devices / Re: Strange WiFly Problem on: October 03, 2011, 06:04:56 am
Code:
    temp[i] = *(" ");
should be
Code:
    temp[i] = ' ';
Pages: 1 ... 2119 2120 [2121] 2122 2123 ... 3080