I have been trying to make a serial connection with the Pololu JRK21v3 motor controller with no success. I am sure that I have made the correct connections with the TX and RX lines and connected the grounds. I have also configured the JRK to be in the UART mode
My code that I have been using is the following. I would appreciate any help on this.
// This function prints “siz” HEX values from the “buf” array
Thanks for the reply. It is possible to send serial
Since the Arduino's serial lines are used for programming and debugging, I use the SoftwareSerial library to send data to the on pins other than the hardware serial lines (0 and 1). If I use the 0 and 1 pins while debugging, I get an error.
Reference Language (extended) | Libraries | Comparison | Changes
SoftwareSerial(rxPin, txPin)
Description
A call to SoftwareSerial(rxPin, txPin) creates a new SoftwareSerial object, whose name you need to provide as in the example below. You still need to call SoftwareSerial.begin().
Parameters
rxPin: the pin on which to receive serial data
txPin: the pin on which to transmit serial data
Example
define rxPin 2
define txPin 3
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
See also
?SoftwareSerial.begin()
?SoftwareSerial.read()
?SoftwareSerial.print()
?SoftwareSerial.println()
Reference Home
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
The only serial data that you are sending is being sent using the Serial.println() function, which is sending data to the hardware serial port (pins 0 and 1).
If the motor controller is connected to those pins, perhaps it is the extra CR\LF that println adds that is causing the problem.
If the motor controller is connected to pins 2 and 3, perhaps you need to create an instance of the SoftwareSerial class that is actually associated with those pins, and use the SoftwareSerial instance (actually, NewSoftSerial is preferred) to send data to those pins.