Search found 33 matches

by ecorrales
Tue Aug 07, 2018 8:40 am
Forum: General Discussion
Topic: Runaway?
Replies: 1
Views: 1334

Runaway?

Hello, Successfully communicating / controlling a Roboclaw over USB (Raspberry). C++. USB. Boost libraries. Every so often, probably once every 15-20 mins, sometimes even longer, my program loses control of the Roboclaw. Mostly when the robot has bumped up against something, or too many back-n-forth...
by ecorrales
Tue Aug 07, 2018 8:15 am
Forum: General Discussion
Topic: Command 54 - M1/M2 Duty & Acceleration
Replies: 1
Views: 1477

Command 54 - M1/M2 Duty & Acceleration

Hello, I am using a Roboclaw + motors without encoders. Over USB. Raspberry Pi. C++. I treat both motors together (it's a tracked robot, for turning I just want to pivot, so duty cycle is always the same amplitude just different sign (?)). Been using someone else' code. I believe it's currently comm...
by ecorrales
Fri Jul 20, 2018 9:38 am
Forum: General Discussion
Topic: Any data back from Roboclaw indicating movement without using encoder?
Replies: 1
Views: 1320

Any data back from Roboclaw indicating movement without using encoder?

Hi, I made a mistake a beginning and got a robot kit + motors withOUT encoders. :( Have successfully gotten the robot to move around, gently bump into things (walls) and monitor the amps to know when that occurs. Is there any other data back from Roboclaw that gives some indication of movement? thanks
by ecorrales
Mon Jun 18, 2018 8:15 am
Forum: General Discussion
Topic: Emergency Stop Circuit
Replies: 9
Views: 4691

Re: Emergency Stop Circuit

Hi, thanks for the suggestions. I was using the term E-Stop to refer to that function on the Roboclaw via the S3,4,5 pins. A physical button isn't much use to me since I can't be present at location of the robot if/when it crashes or control is lost at speed. That's why the circuit was made to force...
by ecorrales
Wed Jun 06, 2018 3:18 pm
Forum: General Discussion
Topic: Emergency Stop Circuit
Replies: 9
Views: 4691

Re: Emergency Stop Circuit

I was able to come up with a (siimple?) E-stop circuit. https://github.com/elicorrales/roboclaw/blob/master/roboclaw.e.stop.circuit.png (schematic image). https://github.com/elicorrales/roboclaw/blob/master/e-stop.asc (LTSpiceIV file). The Raspberry's 3.3V GPIO output pin pulses at 7ms on / 7ms off,...
by ecorrales
Sat Jun 02, 2018 9:16 pm
Forum: General Discussion
Topic: Simple C or C++ example for Raspberry?
Replies: 19
Views: 7776

Re: Simple C or C++ example for Raspberry?

Hi, I tried the following, and it works, however it uses Boost. :( #include <iostream> #include <boost/asio.hpp> using namespace std; string serialDev = "/dev/ttyACM0"; boost::asio::io_service io; boost::asio::serial_port serial(io, serialDev); string getVersion() { uint8_t commands[] = { 0x80, 0x15...
by ecorrales
Fri Jun 01, 2018 10:53 am
Forum: General Discussion
Topic: Simple C or C++ example for Raspberry?
Replies: 19
Views: 7776

Re: Simple C or C++ example for Raspberry?

Yes.. 1) Roboclaw works with Ion Studio 2) Has latest firmware 3) will try the 'reset' 4) I'm also having Python issues - will tackle that part later, BUT - I already confirmed the Raspberry Pi + serial port does work by taking someone else's code. However, I don't want to use that code because it d...
by ecorrales
Thu May 31, 2018 5:01 pm
Forum: General Discussion
Topic: Simple C or C++ example for Raspberry?
Replies: 19
Views: 7776

Re: Simple C or C++ example for Raspberry?

I also tried this:

Code: Select all

	cout << "Writing  0x80,0x15......\n";

	uint8_t bytes[2] = { 0x80, 0x15 };
	errno = 0;
	int bytesWritten = write(_fd,&bytes,2*sizeof(uint8_t));
	if (1>bytesWritten) {

		hwSerialHandleError("Error writing 0x80",errno);
	}
same result
by ecorrales
Thu May 31, 2018 3:45 pm
Forum: General Discussion
Topic: Simple C or C++ example for Raspberry?
Replies: 19
Views: 7776

Re: Simple C or C++ example for Raspberry?

ok, learned a bit more. program output: hwSerialBegin(9600) inSpeed : 1 outSpeed : 1 inSpeed : 13 outSpeed : 13 Writing 0x80...... Writing 0x15...... doing read loop...... seeing if bytes available...... . seeing if bytes available...... . seeing if bytes available...... . seeing if bytes available....
by ecorrales
Wed May 30, 2018 2:41 pm
Forum: General Discussion
Topic: Simple C or C++ example for Raspberry?
Replies: 19
Views: 7776

Re: Simple C or C++ example for Raspberry?

Hi, I don't think it's the issue of hex vs decimal. see below. Could it be I need to set start/stop bits, parity..etc.. I was confused in the manual.. because it talks about serial and packet serial... Here is test output: RoboClaw::RoboClaw() RoboClaw::begin() HardwareSerial::hwSerialBegin(9600) in...