Wireless control of a stepper motor/servo ?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

The Tx and Rx pins are for TTL Serial communication. You can configure these modules to work as a wireless modem. You would need a processor at each end then.

User avatar
mjpcarbon
 
Posts: 436
Joined: Fri Nov 29, 2013 8:57 pm

Re: Wireless control of a stepper motor/servo ?

Post by mjpcarbon »

I see so they are limited to one function ?

On the digi Xbee site, they have a JoyStick example and they are utilizing 4 pins, the example shows how to configue the TX but not the RX however it shows 4 separate LEDS working on the RX side ?

http://examples.digi.com/sensors/joystick-with-xbee/
How is this being done ?

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

I see so they are limited to one function ?
No. Not at all. There are several i/o pins that can be used in line-passing mode.
You asked about Rx and Tx - these are used for serial communication - including the communication necessary to configure the module.

In the example you posted, Rx and Tx are used only to configure the module. The pins that are actually used by the joystick are D0, D1, D2, D3. http://examples.digi.com/sensors/joystick-with-xbee/4/

User avatar
mjpcarbon
 
Posts: 436
Joined: Fri Nov 29, 2013 8:57 pm

Re: Wireless control of a stepper motor/servo ?

Post by mjpcarbon »

Hmm,so it possible however in the example the TX Xtcu setup is shown, I was not able to see or find how the RX side is configured ?
This part is kind of magical

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

I don't see any Tx configuration In the example you posted.

http://examples.digi.com/sensors/joystick-with-xbee/3/
Here are the commands we’re going to use to configure the radio:
Function Command Parameter
Reset ATRE N/A (resets the radio to its factory settings)
PAN ID ATID 3001 (any address from 0 to FFFE will do)
MY Address ATMY 1
Destination address high ATDH 0 (indicates a 16-bit address)
Destination address low ATDL 2 (the address of the receiving radio)
Pin 0 I/O configuration ATD0 3 (digital input)
Pin 1 I/O configuration ATD1 3 (digital input)
Pin 2 I/O configuration ATD2 3 (digital input)
Pin 3 I/O configuration ATD3 3 (digital input)
Change detection ATIC F (bitmap field: first four inputs send samples on change, SEE BELOW for more information)
Write to memory ATWR N/A (save the settings to flash memory)

User avatar
mjpcarbon
 
Posts: 436
Joined: Fri Nov 29, 2013 8:57 pm

Re: Wireless control of a stepper motor/servo ?

Post by mjpcarbon »

Based on the example that started this project I am already using Pin20 AD0/DIO0 on the TX and Pin 6 on the RX as per the example
I only wish to add one more pin for TX(19)AD1/DI01 side, and one on the RX ?

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

I see. So you are not talking about TX and RX pins. You are talking about configuring the transmitting module and the receiving module. That is an entirely different question.

Follow the instructions in the first tutorial you were using: http://alselectro.BANNED.com/2013/10 ... putoutput/
But extend it to any other pins you want to do line-passing on.
The transmitting side pins should be configured as inputs and the receiving side pins as outputs.

User avatar
mjpcarbon
 
Posts: 436
Joined: Fri Nov 29, 2013 8:57 pm

Re: Wireless control of a stepper motor/servo ?

Post by mjpcarbon »

I will work on that tonight, when you have multiple pins how do they know who it talking to who ?
It isnt very clear in the example.
I will check back with my results

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

It is always pinto-pin. 0-0, 1-1, 2-2 etc.

User avatar
mjpcarbon
 
Posts: 436
Joined: Fri Nov 29, 2013 8:57 pm

Re: Wireless control of a stepper motor/servo ?

Post by mjpcarbon »

I am sorry to keep asking questions but I still dont get it.
First in the example they use pin 20 on the TX and pin 6 on the RX side ???? which isnt what you say 0-0 1-1 etc.
Second setting TX to input or output is not an option on the DI pins, choices are Disabled
ADC DI etc .
Third and most confusing is pin 19 and 20 both affect the pin 6 ! Yikes

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: Wireless control of a stepper motor/servo ?

Post by adafruit_support_bill »

This is getting a bit beyond what I have actually experimented with. But as I understand it, for every input pin there is a corresponding output pin:

http://www.digi.com/support/kbase/kbase ... tl?id=2188
Enabling the DIO Lines (Base):
The DIO feature can be enabled on the base with ATDn=4,5 (4 is DO default low and 5 is DO default high) where n= 0-7(the DIO pin you wish to use). Remember that the inputs and outputs need to be mapped together, so if you enable DI2 on the remote you must enable DO2 on the base. Each DIO line is connected to a specific pin on the module and some pins may have other features on them.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”