Can't seem to get serial communication working on Qik 2s9v1 motor controller

I can’t seem to get serial communication working on the Qik 2s9v1 motor controller. After trying the demo code provided by Pololu, I stepped back and created a simple sketch that implemented the steps in the Qik 2s9v1 Troubleshooting chapter using just the SoftwareSerial library. I’m driving the Qik from a Pololu AStar32U4 MIni. The connections from the MIni to the Qik are as follows

Mini Qik
GND GND
5V VCC
D3 RX
D2 TX

The 38400 baud jumper is on place on the Qik (i.e., the two outer pins)

Per the troubleshooting guide

  1. I have a green flashing heartbeat
  2. When I transmit 0xBF I get a red light on the Qik
  3. When I then transmit 0x82 the red light goes off.
    HOWEVER, I don’t seem to get a byte in response to sending 0x82. The code (below) hangs looping on the “available()” call, never printing out the response or the “DONE” string

Do you have any suggestions what I might try next? I’ll just mention that this is the second Qik that I’ve tried (and had the same problem), so I’m leaning towards some issue with how I’m using the library rather than any hardware problem.

Thanks for any help,
Brian

==============================================================

#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);

void setup(){
  Serial.begin(9600);
  mySerial.begin(38400);

  delay(5000);
  Serial.println("STARTING");
  mySerial.write(0xBF);
  delay(3000);
  mySerial.listen();
  mySerial.write(0x82);
  while (mySerial.available() < 1);
  Serial.println(mySerial.read());
  Serial.println("DONE");

}

void loop() {
  // put your main code here, to run repeatedly:

}

Hello, Brian.

I am sorry you are having trouble getting your code to work with the qik. In order to use the SoftwareSerial library, the RX pin needs to be capable of pin-change interrupts and it looks like you are using pins that do not support that. On our A* 32U4 Mini boards pins 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI), and 17 (!SS) support pin-change interrupts. So, try switching RX to one of those pins. (There are no limitations for the TX pin, so pin 3 should be fine.)

-Jon

Hi Jonathan,
That was it! And after modifying the demo program, that’s working, too.
Thanks very much!
Brian