question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edge detection in Blinka

See original GitHub issue

Hey @makermelissa!

We’re porting @olixr Mudpi application code to use Blinka on the core in order to allow users to use their Linux SBC https://github.com/mudpi/mudpi-core/issues/15 (previously RPI was the only supported one) which is almost done by @SecT0uch

One of the issues we encountered is that we had RPi.GPIO as a dependency that does edge detection for event addition and handling and we couldn’t find that reference on Blinka. We did find it on Circuitpython documentation but nothing on Blinka itself.

Another proposed solution was to use adafruit_debouncer for edge detection, do you think it could help?

Can you guys help us a bit on that, maybe I didn’t search in the correct place 😢

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sgroblercommented, Jun 25, 2022

@makermelissa - many thanks. I realised that I just need to use BCM mode and then I can use RPi.GPIO as well as Blinka.

0reactions
makermelissacommented, Jun 15, 2022

@ladyada - How does one use RPi.GPIO at same time? I’m getting an error message:

GPIO.setmode(GPIO.BOARD)
ValueError: A different mode has already been set!

I don’t think you can change modes because it needs to be in BCM mode for Blinka to work: https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/bcm283x/pin.py#L7

Read more comments on GitHub >

github_iconTop Results From Across the Web

CircuitPython & Python | Adafruit NeoTrellis
EDGE_RISING: trellis.pixels[event.number] = CYAN #turn the LED off when a rising edge is detected elif event.edge == NeoTrellis.
Read more >
Analyze Accelerometer Data on MaaXBoard with Edge Impulse
Use CircuitPython (Adafruit Blinka) and Edge Impulse to collect and train a model using accelerometer data from Avnet's MaaXBoard.
Read more >
Edge Detector - DepthAI documentation - Luxonis
Edge Detector ¶. This example performs edge detection on 3 different inputs: left, right and RGB camera. HW accelerated sobel filter 3x3 is...
Read more >
How to do rising-edge detection on a Raspberry Pi Pico
I see the Raspberry Pi allows one to do something like below to detect rising edges on a GPIO port (reference: ...
Read more >
Blinka - CircuitPython
Blinka brings CircuitPython APIs and, therefore, CircuitPython libraries to single board computers (SBCs). It is a pip installable Python library that runs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found