BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Nov 19, 2017 11:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Thu Feb 06, 2014 1:22 pm 
Offline
New User

Joined: Thu Feb 06, 2014 1:10 pm
Posts: 1
Dear Friends,

I need a big Help!

I'm trying to get version of my RoboClaw, but I did not get.

I'm trying to make a "PacketSerial" connection to send the command to Roboclaw, but she did not answer me.


My schema: http://postimg.org/image/r1ubhr2qf/

In RobocLaw as the main battery is connected a 24V battery.
I'm using the Arduino UNO R3, connected in USB

The code I'm using is this:
Code:

#include "BMSerial.h"
#include "RoboClaw.h"

//Roboclaw Address
#define address 0x80


RoboClaw rc(0,1,10000);

void setup() {
  //Open terminal and roboclaw serial ports
  //terminalSerial.begin(57600);
  rc.begin(38400);
}

void loop() {
  char version[32];

  if(rc.ReadVersion(address,version)){
    Serial.println(version); 
  }

  delay(100);
}



What can I be doing wrong?


Note. Even reading the tutorial could not make the configuration Roboclaw by the buttons.

Can someone help me with this too?

Sorry for my English, I'm using google translator.


Top
 Profile  
 
 Post subject: Re: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Tue Feb 11, 2014 3:17 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Im not sure I understand. Have you set the mode of the roboclaw to packetserial using the 3 buttons?

Are you not able to set it, or do you not understand the description of using the buttons? Let me know and I can walk you through it step by step.

Assuming you have set the mode correctly, there is a bug in your program.

You never setup the Serial on the arduino. You need to use a Serial.begin(baudrate) command so that your Serial.println(version); has somewhere to print to.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Mon Feb 17, 2014 3:47 pm 
Offline
Citizen

Joined: Mon Feb 17, 2014 3:27 pm
Posts: 5
Hi,

I am having very similar problems. When I try to connect via USB and a terminal program the first command is accepted
and it the lockup my terminal program. I think Basic micro may need to look at this. Just thought you might want to know.


Top
 Profile  
 
 Post subject: Re: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Thu Feb 20, 2014 4:43 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
In the first test program I don't see anywhere where the Serial terminal is configured (started)
example something like: Serial.begin(57600);

Edit: Actually you have a conflict here. You are using IO pins 0,1, which are also the IO pins on the UNO that are to the hardware serial port (Serial). So your output to Serial, will go to the roboclaw...


Top
 Profile  
 
 Post subject: Re: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Sat Feb 22, 2014 8:50 am 
Offline
Citizen

Joined: Mon Feb 17, 2014 3:27 pm
Posts: 5
Hi,
Have you tried running in USB mode using the Roboclaw setup windows interface? I tried using simple serial mode
and had setup correctly but I had a similar issue. the unit would not accept more than 1 motion command. I tried
the windows interface and the roboclaw would lockup. It might be worth trying this just to make sure you are not
chasing a firmware issue V4.00. If you try USB mode you might need the CDC virtual driver.


Top
 Profile  
 
 Post subject: Re: HELP ME - RoboClaw 2x15 + Arduino
PostPosted: Wed Mar 05, 2014 10:22 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
HI, microsteve. If you read closely this user is having issues with communications in packet serial, not simple serial. He is also using the 2 hardware serial pins on the arduino which also send and receive data to/from the PC which is probably the cause of his problem. Please post your problem in a new thread without hi=jacking this thread.

P.S. Kurt's reply may be related to your own problem if you are using an arduino and trying to use pins 0 and 1 to talk via simple serial otherwise I expect they are unrelated.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO