Show Posts
Pages: 1 ... 2318 2319 [2320] 2321 2322 ... 3072
34786  Using Arduino / Project Guidance / Re: Wireless motor control using PWM on: May 15, 2011, 09:37:23 am
Quote
I have successfully sent data wirelessly from one arduino to another.
Good.

Quote
similarly i can send the PWM value
Then, what's the problem?

Quote
at the receiver end how can we inplement that that value for analogue write
If you've received a value, just call analogWrite() with that value. If you've received an array of characters, use atoi() to convert the NULL terminated array of characters to an int, and call analogWrite() with that value.
34787  Using Arduino / Programming Questions / Re: Continuous Rotation Servo + PIR Sensor Help! on: May 15, 2011, 09:12:12 am
When that code sees a low value from the PIR, it calls a function, blinky().

That function turns the LED on, waits, turns the LED off, and waits again, in a loop. It executes the loop 3 times.

Get rid of the loop, and change the time that the function waits after turning the LED on. Remove the wait after turning the LED off.

Rename the function, because it no longer blinks an LED, and change the pin to the one that the servo is attached to.

The function will then run the servo for the specified period of time every time the PIS sensor outputs a low value.

The next thing to consider is that maybe you don't want the function to be called EVERY time the sensor outputs a low value. Maybe you only want to call the function ONCE when the sensor outputs a low value. Think about how you might do that.
34788  Using Arduino / Networking, Protocols, and Devices / Re: GSM sim300 on: May 15, 2011, 07:08:03 am
Post a link to the SIM300, and maybe we can help. Otherwise, it's unlikely.
34789  Using Arduino / Project Guidance / Re: RPM of Brushless motor on: May 15, 2011, 06:58:31 am
Quote
What rpm of motor will be necessary to fly aroung weight 500gm.
Which RPM of which motor with which propeller? RPM alone is not sufficient to answer your question.

You've got a lot more research to do before RPM is even a consideration.
34790  Using Arduino / Project Guidance / Re: xbee questions and motor shield on: May 15, 2011, 06:52:10 am
Pictures of the shields are almost useless. They all have the same general shape.

Yes, it is possible to connect the shields using wires instead of using headers and plugging them in. You need to make sure that every connection that the shield assumes IS actually made. Consult the wiring diagram for the shield, not the picture.
34791  Using Arduino / Project Guidance / Re: Wireless motor control using PWM on: May 15, 2011, 06:43:09 am
Quote
But how does same thing can be done wireless by using a simple rf module.
please let me know in detail.
You need to provide more details about what you are trying to accomplish. Will there be an Arduino on both ends of the wireless link? If so, you can simply send the value that should be written to the PWM pin, from one Arduino to the other, and have the other Arduino analogWrite that value to a PWM pin.
34792  Using Arduino / Programming Questions / Re: Serial communication between Gyro and compass repeater on: May 14, 2011, 08:59:48 pm
Quote
Is it possible to read the string into an Arduino (Uno)
Yes, it is.

Quote
and then remove the ROT line
The ROT portion is not a line, but, you can parse the string (strtok() would be useful), and assemble an array of characters to send.

Quote
and send it out again (on a second serial port)
Have you counted serial ports on the Uno? There is one.

You could, however, use NewSoftSerial to create a software serial port, to send data out. Whatever you are sending it to needs to be connected to the appropriate pins (and ground).
34793  Using Arduino / Programming Questions / Re: How to always ensure that sensor data is sent out in 3 characters? on: May 14, 2011, 08:53:46 pm
Quote
How can I always ensure that the data I am sending over the serial port is 3 characters long?
Sending 3 characters in every packet does NOT translate to receiving 3 characters in every packet. You should not expect that every byte sent will be received. You should find another way to indicate the end of the packet, and learn to deal with variable length packets.
34794  Using Arduino / Project Guidance / Re: 2 serial UART on 1 Arduino ? on: May 14, 2011, 09:55:36 am
NewSoftSerial works up to 115200 baud.
34795  Using Arduino / Networking, Protocols, and Devices / Re: DHCP client for Arduino on: May 14, 2011, 09:12:40 am
Spend much time searching? There are pages and pages of hits for "DHCP client". Try it yourself.
34796  Using Arduino / Project Guidance / Re: 2 serial UART on 1 Arduino ? on: May 14, 2011, 08:18:02 am
You can use NewSoftSerial, and use any pair of pins for a software serial port.

Or, you can get a Mega which has 4 hardware serial ports.
34797  Using Arduino / Programming Questions / Re: if statement with array value on: May 14, 2011, 08:14:48 am
You've made a number of code changes that we can't see. Perhaps it's time to post your code again.
34798  Using Arduino / Programming Questions / Re: if statement with array value on: May 14, 2011, 07:56:58 am
Your variable is declared inside loop, so it goes out of scope at the end of loop. It is also never initialized. Global variables and static variables ARE initialized, by the compiler, to 0. Heap variables, declared in a function, are not.
34799  Using Arduino / Interfacing w/ Software on the Computer / Re: Bash to send command to Arduino on: May 14, 2011, 07:53:10 am
I would guess that screen opens the serial port once, and keeps it open, and that echo opens the port, sends the data, and closes the port.

Opening and closing the serial port causes the Arduino to reset. The echo command sends the data before the Arduino is ready to read it, so it gets lost. The immediate reset causes the action, even if the data was received to not be executed.

There are ways to modify the Arduino to prevent a reset on the opening of the serial port.
34800  Using Arduino / Programming Questions / Re: if statement with array value on: May 14, 2011, 07:48:24 am
Now it's time to go read reply #2.
Pages: 1 ... 2318 2319 [2320] 2321 2322 ... 3072