Skip to content

FrequencyIO in CircuitPython 8.2.x always returns '0'.  #8653

Open
@cormalenv

Description

@cormalenv

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Bee-Data-Logger with ESP32S3
Board ID:smartbeedesigns_bee_data_logger

Adafruit CircuitPython 8.2.0-rc.0 on 2023-06-23; Bee-Data-Logger with ESP32S3
Board ID:smartbeedesigns_bee_data_logger

Adafruit CircuitPython 8.2.8 on 2023-11-16; ESP32 Devkit V1 with ESP32
Board ID:doit_esp32_devkit_v1

Code/REPL

import frequencyio, board, time

frequency = frequencyio.FrequencyIn(board.D41)

while True:
    print(frequency.value)
    frequency.clear()
    time.sleep(1)

Behavior

Frequency returns as '0' when 71 kHz square wave applied.

Serial output in CircuitPython 8.2.0 and 8.2.8 on all boards tested.:

0
0
0
0
...

Description

Signal generated by external sensor (Vmin 97 mV - Vmax 3.2 V, 71 kHz square wave as below) to digital pin. FrequencyIO returns '0' in all scenarios.

Additional information

Debugging:

  1. tested on multiple Esp32S3 and ESP32 Dev Kit v1 - FAIL
  2. Switched GPIOs - FAIL
  3. Boards were reset and firmware reflashed - FAIL
  4. Tested GPIO digital function via keypad lib (below) - PASS
import board,keypad,time

while True:
    with keypad.Keys((board.D41,), value_when_pressed=False) as keys:
        event = keys.events.get()
        if event:
            if event.pressed:
                print("pressed")

>> pressed
>> pressed
...

Frequency input signal

Screenshot 2023-11-23 154252

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions