Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Synchronizing ADC samples with another periodic event (e.g. PWM out)

オープン
#10,978 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
c, python
領域
embedded-iot

調査の方向性

Start by reading the CircuitPython analogbufio and PWM APIs and checking whether they expose a way to synchronize ADC sampling with a periodic output. The issue does not name files or tests; done would mean establishing a supported approach for phase-locked sampling, or clarifying what capability would need to be added.

索引モデルが issue の本文から書いたものです。

説明

circuitpython api enhancement

Is there any sanctioned way in Circuitpython to sample an ADC coincident another periodic action? For example, is there any way to output a PWM signal and start ADC sampling with analogbufio, with some assurance that the two will actually be phase-locked?

I'm teaching an instrumentation class, and my use case is a beam-block sensor where you pulse an LED and collect analog samples from a photodiode some distance away. The right way to do this is to collect two analog samples for each cycle of LED PWM: one during the "on" time and the other during the "off" time. Do this for a while, then subtract the "off" samples from the "on" samples and average.

Alternatively we can try a tight loop (software PWM) where we turn the LED on, sample, LED off, sample, etc. But it would be nicer to do it using proper PWM. I think there are similar use cases for things like synchronized ADC/DAC sampling and so on, basically any time you have two periodic processes that you want to link together.

Also, if it's not inappropriate to ask here, would this be relatively trivial in micropython using a PWM with associated timer interrupt? (I'm an embedded guy but don't have experience with either micro- or circuit-python, only C/C++)

主要言語
C
スター
4.6k
フォーク
1.4k
平均マージ
1日 7時間
マージ済み PR(30日)
166

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adafruit/circuitpython のほかの issue

adafruit/circuitpython の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。