SparkFun Qwiic Twist - RGB Rotary Encoder Breakout DEV-15083

I’m trying to make the RGB Rotary Encoder Breakout DEV-15083 work.

I’m using 3.3 volts.

When I connect to the Encoder board to the MCU and send I2C commands the only response I get from the Encoder board is 0xFF. According to the Qwiic Twist Register Map, I should get 0x5C from the ID register and 0x0100 from the firmware_MSB/LSB registers but I get 0xFF for these and ALL the other registers.

I started with the default 7-bit I2C address of 0x3F but then soldered the jumper to make the I2C address be 0x3E. The results were the same - I only receive 0xFF.

I have confirmed that I am sending the correct code and receiving 0xFF using:

  1. an oscilloscope

  2. a Diligent Analog Discovery 2 analyzer

  3. RealTerm: Serial Capture Program

  4. Tera Term

If I connect my oscilloscope to Rotary Encoder SW1 terminals A and B, I see the pulses as the knob is rotated but the ATtiny 84 dosn’t respond.

I have done the above using the Qwiic connectors and using the hard wire connections.

It appears the ATtiny84 may be defective.

What are you connecting the Qwiic Twist too and are you using our example code?

I’m connected to a 18F4550 MCU. I’m using my code.

Additional Information:

I have a program that sequentially polls the board with I2C addresses from 0x00 to 0xFF. I just tried this software again with the following SparkFun boards:

  1. GridEYE AMG8833

  2. AS7263 Spectral Sensor

  3. Qwiic IR Breakout SPX-15804

  4. Rotary Encoder DEV-15083

Using the same circuitry and the same software the first three responded with their correct addresses but the Rotary Encoder did not respond.

It seems to me that there is something wrong with the Rotary Encoder board. Do you agree?

With the address jumper close, does the board respond to your I2C address scanner program?

Also, can I get your order number?

I did this with the address jumper open and soldered. I got no response from the Rotary Encoder fir either case.

My invoice number is: 928**

Any update on this?

Hi whatpic.

Sorry for the delay, we’re short staffed and working remotely.

If it’s not responding to an I2C scanner, the only thing I can assume is that something is wrong with the board. I’ll get a replacement sent out to you ASAP. I’ve created replacement ticket# 22714 for you.

Thanks!

The replacement is working but I have a question.

In the Hookup Guide it says:

“boolean isClicked(); – Returns true if a click event has occurred. Event flag is then reset.”

I understand what Twist and Button pressed events are but what is a “Click Event”?

“boolean isClicked(); – Returns true if a click event has occurred. Event flag is then reset.”

I understand what Twist and Button pressed events are but what is a “Click Event”?

I believe a Click Event is when you move the knob past one detent. For example, one rotation of the knob would generate 24 Click Events.

Is a Click event from turning the encoder, or by pressing down on the button? twist.isClicked returns true if the button has been pressed, and twist.getCount changes if the encoder has been turned. At least that’s how I am using the library.

chris101:
Is a Click event from turning the encoder, or by pressing down on the button? twist.isClicked returns true if the button has been pressed, and twist.getCount changes if the encoder has been turned. At least that’s how I am using the library.

This is how it works, at least empirically. “isPressed” returns true when the button is held down (ie, it’s pressed down). “isClicked” returns true when the button has been pressed and released.

To see this in action, bring up Twist Example1_BasicReadings, and add the following code after the “if(twist.isPressed()” line…

if(twist.isClicked()) {
    Serial.print(" Clicked!");
    delay(1000);
}

The notion of “has been clicked” is how it’s referenced in the Qwiic Button library, too, except there it’s actually called “hasBeenClicked()”, instead of “isClicked()”, which makes a little more sense.

Edit to add - Example5_TimeStamps already shows this without modification, too! In addition, you can use it to see that “isPressed()” only returns true while the button is indeed pressed, and “isClicked()” only returns true once the button has been released. So, if your code has “been away” for a bit, and you need to determine if someone quickly pressed and released the button, you might have to do something like:

if ( twist.isPressed() || twist.isClicked() )

Thanks Dave. That makes more sense.