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

More efficient ADC sample reading in espressif port

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c
領域
embedded-iot

調査の方向性

Start with ports/espressif/common-hal/analogio/AnalogIn.c, especially common_hal_analogio_analogin_get_value(), and trace how ADC unit, channel, and calibration setup relate to AnalogIn creation and configuration. Compare the lifecycle with the linked Arduino ADC implementation; done means repeated reads avoid unnecessary setup while configuration changes and initialization errors are handled correctly.

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

説明

I've been looking at some ESP32-S2 ADC phenomena recently and ended up comparing CircuitPython and Arduino code.

The CircuitPython code looks like it's initialising quite a few things per read (use of the value property on AnalogIn object) that only need to be done once. Insides common_hal_analogio_analogin_get_value() there are calls to adc_oneshot_new_unit() and adc_oneshot_config_channel() which the Arduino code only does once or when configuration options change.

https://github.com/adafruit/circuitpython/blob/1727222d93718184287b7a10f949a19abd5faba2/ports/espressif/common-hal/analogio/AnalogIn.c#L82-L89

I note the return code from adc_oneshot_config_channel() is checked in the Arduino code.

Perhaps the calibration initialisation could also be done just once when AnalogIn is instantiated.

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

環境構築

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

はじめの一歩

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

adafruit/circuitpython のほかの issue

adafruit/circuitpython の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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