help: Rx and Tx pins on arduino with G15 servo

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

Re: help: Rx and Tx pins on arduino with G15 servo

Postby muta » Wed Oct 01, 2014 3:37 am

Hi
i have uploaded a link to a video showing my setup and also showing that everything is running well when using the original G15 library, but when the softwareserial is uploaded it does not work.
my connections are just as in the examples from the library i got from you, as follows:

G15DriverInit(19200,2,3,8);
arduino rx(2) --------connected to GD02 tx
arduino tx(3)---------connected to GD02 rx
arduino pin(8)--------connected to GD02 CTRL

i cant figure out what the problem is as you have also confirmed that you have tested the library and it worked.
hope the video could help, here is the link
http://www.youtube.com/watch?v=Cs71WhuCgDs&feature=youtu.be
muta
Freshie
 
Posts: 7
Joined: Fri Sep 26, 2014 9:14 pm

Re: help: Rx and Tx pins on arduino with G15 servo

Postby yonghui » Wed Oct 01, 2014 9:27 am

G15DriverInit(19200,2,3,8);
arduino rx(2) --------connected to GD02 tx
arduino tx(3)---------connected to GD02 rx
arduino pin(8)--------connected to GD02 CTRL


Hi,
the only different i notice is the A-B slide switch on the board.

as you will find from G15.h file my library definition is below
#define TxMode LOW //Master Transmit to G15
#define RxMode HIGH //Master Receive from G15

thus the slide switch will need to be set to B side, but from the video i think you are setting it to A side. try change the setting and see.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: help: Rx and Tx pins on arduino with G15 servo

Postby yonghui » Wed Oct 01, 2014 9:31 am

i think the original G15 driver library is setting the CTRL pin Polarity i.e. TxMode and RxMode differently. Sorry that i made you confused.
the software serial G15 driver library, i develop/adapt it from G15 shield library which made the polarity of control pin different.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: help: Rx and Tx pins on arduino with G15 servo

Postby muta » Wed Oct 01, 2014 10:36 am

Hi
you were right, it worked when i have set the switch to the B position :D :D :D
finally, thanks alot for your great help.

i just have some wonder about few of the capabilities of the G15 servo, is it possible to read the position/angle of the horn as it is rotating? and can the servo be instructed to do a number of turns, like 3 continuous turns?
and now since i am able to use the hardware serial, how can i read data from the servo to the serial monitor, things like the load, temperature and position... ect
muta
Freshie
 
Posts: 7
Joined: Fri Sep 26, 2014 9:14 pm

Re: help: Rx and Tx pins on arduino with G15 servo

Postby yonghui » Wed Oct 01, 2014 11:20 am

hi,

yes, you can read the position while it is rotating. also you can read other data and display it to the serial software on computer. refer to the control register of the G15 servo for addresses of data you want to read.
however for instruction to rotate 3 turns, i think there is no simple option to do it yet.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Previous

Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 10 guests

cron