本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)30k · #9356

hardware

できること

このスキルは、エージェントがSipeedボードに接続されたセンサー、ディスプレイ、その他のハードウェアと通信できるようにします。デバイスの検出、値の読み取り、I2CとSPIでのコマンドの送信を扱います。

使う場面

  • ✓Sipeedボードの温度または湿度センサーの値を読みたいとき。
  • ✓ボードのI2CまたはSPIのバスに、どのデバイスが接続されているかスキャンしたいとき。
  • ✓ボードに接続されたディスプレイやその他の周辺機器を操作したいとき。

スキルのリンク

https://github.com/sipeed/picoclaw/blob/main/workspace/skills/hardware/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sipeed/picoclaw/blob/main/workspace/skills/hardware/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“LicheeRVボードのI2Cバスをスキャンして、接続されているセンサーの温度を読んでください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは利用可能なバスを一覧にし、接続されたデバイスをスキャンして、あなたが指定したセンサーのレジスタを読みます。書き込みの操作には先にあなたの確認が必要です。アドレスと転送サイズは、制限に照らして確認されます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Hardware (I2C / SPI)

Use the i2c and spi tools to interact with sensors, displays, and other peripherals connected to the board.

Quick Start

# 1. Find available buses
i2c detect

# 2. Scan for connected devices
i2c scan  (bus: "1")

# 3. Read from a sensor (e.g. AHT20 temperature/humidity)
i2c read  (bus: "1", address: 0x38, register: 0xAC, length: 6)

# 4. SPI devices
spi list
spi read  (device: "2.0", length: 4)

Before You Start — Pinmux Setup

Most I2C/SPI pins are shared with WiFi on Sipeed boards. You must configure pinmux before use.

See references/board-pinout.md for board-specific commands.

Common steps:

  1. Stop WiFi if using shared pins: /etc/init.d/S30wifi stop
  2. Load i2c-dev module: modprobe i2c-dev
  3. Configure pinmux with devmem (board-specific)
  4. Verify with i2c detect and i2c scan

Safety

  • Write operations require confirm: true — always confirm with the user first
  • I2C addresses are validated to 7-bit range (0x03-0x77)
  • SPI modes are validated (0-3 only)
  • Maximum per-transaction: 256 bytes (I2C), 4096 bytes (SPI)

Common Devices

See references/common-devices.md for register maps and usage of popular sensors: AHT20, BME280, SSD1306 OLED, MPU6050 IMU, DS3231 RTC, INA219 power monitor, PCA9685 PWM, and more.

Troubleshooting

Problem Solution
No I2C buses found modprobe i2c-dev and check device tree
Permission denied Run as root or add user to i2c group
No devices on scan Check wiring, pull-up resistors (4.7k typical), and pinmux
Bus number changed I2C adapter numbers can shift between boots; use i2c detect to find current assignment
WiFi stopped working I2C-1/SPI-2 share pins with WiFi SDIO; can't use both simultaneously
devmem not found Download separately or use busybox devmem
SPI transfer returns all zeros Check MISO wiring and device power
SPI transfer returns all 0xFF Device not responding; check CS pin and clock polarity (mode)
よくある質問

確認なしでデバイスの設定を変えますか?

いいえ。書き込みの操作には、必ず明示的な確認が必要です。

先にピンの設定が必要ですか?

多くの場合は必要です。多くのピンはWiFiと共有されているため、使用前に設定する手順が含まれています。

どのボードに対応していますか?

LicheeRV Nano、MaixCAM、NanoKVMなど、Sipeedのボード向けに書かれています。

詳細

作者による元の説明

Read and control I2C and SPI peripherals on Sipeed boards (LicheeRV Nano, MaixCAM, NanoKVM).

repo: sipeed/picoclaw

人気

GitHubのスター
30k
ランキング
#9356
ライセンス
MIT
更新日
2026/10/30

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル