
Nrf bga
github-linguist/linguist
Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

AI camera via LoRa on Raspberry Pi
LoRaCam is an open-source printed circuit board by mocchan0221, from the mocchan0221/LoRaCam repository on GitHub. It is a 2-layer board of 65 × 30 mm with 12 parts on 55 nets, routed with 32 tracks and 0 vias.
Its parts include 4 resistors, 2 diodes, 1 IC and 1 connector. It belongs with the radio and wireless boards of this library.
AI camera via LoRa on Raspberry Pi
Raspberry Pi + カメラで YOLOv8n (TFLite) による人数カウントを行い、結果を CSV に記録しつつ LoRaWAN で送信するデバイス。
/dev/ttyS0, 9600bps) — AS923-1 (日本), OTAA, Class A| パス | 内容 |
|---|---|
main.py | エントリポイント (設定読込 → Wi-Fi/ホスト名設定 → LoRa Join → 撮影・検出・送信ループ) |
app/ | 各種機能 (カメラ, 検出器, ログ, LoRa通信, 設定, システム初期化) |
models/ | YOLO モデル置き場 (git管理外) |
data/images, data/logs | 最新の検出画像・CSVログ (git管理外) |
services/ | systemd サービス定義 |
scripts/dev_update.sh | 開発機用ワンクリック更新スクリプト |
LoRaTest.py, SystemTest.py | LoRa 通信 / システム設定の単体テスト |
pcb/ | 基板データ (KiCad) |
サービス定義と更新スクリプトはユーザー jkkb、パス /home/jkkb/LoRaCam 前提。
sudo raspi-config → Interface Options → Serial Port で「Login shell: No」「Serial port hardware: Yes」にして再起動cd ~ && git clone https://github.com/mocchan0221/LoRaCam.git && cd LoRaCam
sudo apt install -y python3-picamera2 python3-opencv
python3 -m venv --system-site-packages .venv # apt の picamera2 を venv から使うため
.venv/bin/pip install -r requirements.txtnumpy<2 (requirements では 1.26.4) を使うpyserial。serial パッケージを入れると module 'serial' has no attribute 'Serial' になるmodels/ にコピー)
pip install ultralytics
yolo export model=yolov8n.pt format=tflite int8
# → yolov8n_saved_model/yolov8n_full_integer_quant.tflite を models/ へconfig_template.json を /boot/firmware/config.json にコピーして編集 (下記)sudo cp services/*.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now LoRaCam.service WebMonitor.service/boot/firmware/config.json)| キー | 内容 |
|---|---|
LoRa.DEVEUI / APPEUI / APPKEY | OTAA 用のキー |
LoRa.IsJoined | 1 なら起動時の Join をスキップ |
Camera.Focus | マニュアルフォーカス値 (LensPosition, 0.0 = 無限遠) |
Network.wifi_enabled | 0: Wi-Fi OFF / 1: Wi-Fi ON (SSID, PASSWORD に接続) |
Network.HostName | ホスト名 (.local は付けない。例: jkkb1 → jkkb1.local でアクセス) |
Network.IsLatest | 0 にすると次回起動時に Wi-Fi・ホスト名を適用し、1 に書き換えて再起動 |
Detection.Interval | 検出・送信の間隔 [秒] |
Detection.CONF_THRESHOLD | 検出の信頼度しきい値 |
journalctl -u LoRaCam.service -f # 本体のログ
sudo .venv/bin/python LoRaTest.py # 対話式 LoRa テスト (join / send / recv / at)
sudo .venv/bin/python SystemTest.py # Wi-Fi・ホスト名設定のテスト (IsLatest=0 のとき再起動する)LoRaTest を使う前に sudo systemctl stop LoRaCam.service でシリアルポートを空けておく。
出力:
data/logs/logPerson.csv (人数), logAll.csv (全クラス), logLoRa.csv (送受信履歴)data/images/latest_result.jpg (最新の検出画像)http://<ホスト名>.local:8000/data/ から閲覧可能"YYYY-mm-dd HH:MM:SS <人数>" の ASCII 文字列| 緑 (GPIO17) | 赤 (GPIO27) | 状態 |
|---|---|---|
| 点滅 | 消灯 | 初期化中 (設定読込・カメラ・LoRa Join) |
| 点灯 | 消灯 | 正常動作中 |
| 消灯 | 点灯 | 異常終了 (エラー終了・クラッシュ・120秒応答なし)。10秒後に自動再起動 |
| 点滅 | 点灯 | 異常終了後の再起動中。正常動作に入ると赤は消える |
| 消灯 | 消灯 | サービス停止中 |
赤点灯の原因は journalctl -u LoRaCam.service と /run/loracam-error で確認できる。
PC で編集して push → 開発機で bash scripts/dev_update.sh (sudo は付けない)。pull・サービス更新・再起動を一括で行い、pip は requirements.txt が変わったときだけ実行 (--force-pip で強制)。
config.json を個体ごとに編集 (キー、ホスト名など。IsLatest: 0, IsJoined: 0)| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | MountingHole_2.7mm_M2.5 | MountingHole:MountingHole_2.7mm_M2.5 | MH1, MH2, MH3, MH4 |
| 4 | R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2, R3, R4 |
| 2 | LED | LED_THT:LED_D5.0mm | D1, D2 |
| 1 | A660-900T22-EV61 | MyParts:A660-900T22-EV61 | U2 |
| 1 | GPIO | Connector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_Vertical | J1 |
It measures 65 × 30 mm and has 2 copper layers, 1.6 mm thick.
12 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the mocchan0221/LoRaCam repository on GitHub, at the commit this page was made from: the board is pcb/LoRaCam.kicad_pcb and its schematic pcb/LoRaCam.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask mocchan0221 before reusing the design.

github-linguist/linguist
Language Savant. If your repository's language is being reported incorrectly, send us a pull request!


google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards



hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

VoronDesign/Voron-Tap
Tap is a nozzle-based z-probe for the V2 and Trident printer designs. The entire toolhead moves to trigger an optical switch. Tap offers many advantages:

stacksmashing/pico-tpmsniffer
A simple, very experimental TPM sniffer for LPC bus