Skip to content

docs: Harmonize mcp23009e README — add I2C address and power sections.#207

Merged
nedseb merged 3 commits intomainfrom
mcp23009e-harmonise-readme
Mar 23, 2026
Merged

docs: Harmonize mcp23009e README — add I2C address and power sections.#207
nedseb merged 3 commits intomainfrom
mcp23009e-harmonise-readme

Conversation

@Charly-sketch
Copy link
Copy Markdown
Contributor

Closes #196
Parent issue: #194

Add missing I²C Address and Power Management sections to mcp23009e README

  • Document default I²C address (0x20) and STeaMi usage
  • Add power management section for power_off(), power_on(), and reset()
  • Align README with project documentation standards

@Charly-sketch Charly-sketch requested a review from nedseb March 20, 2026 13:52
@nedseb nedseb added the documentation Improvements or additions to documentation label Mar 20, 2026
@nedseb nedseb requested a review from Copilot March 20, 2026 14:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the mcp23009e driver README to better match the repository’s driver documentation template by documenting the device’s default I²C address and the available reset-pin-based power helpers.

Changes:

  • Added an I²C Address section documenting the default address (0x20) and noting STeaMi’s usage.
  • Added a Power Management section documenting power_off(), power_on(), and reset().
  • Restructured README content (list formatting and moved Examples after the new Power Management section).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/mcp23009e/README.md Outdated
Comment thread lib/mcp23009e/README.md Outdated
Comment thread lib/mcp23009e/README.md Outdated
Copy link
Copy Markdown
Contributor

@nedseb nedseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salut Charly,

PR propre et ciblée — le bon fichier est modifié, les ajouts sont pertinents, le commit message est bon. Quelques corrections nécessaires.


🔴 Artefact ChatGPT dans le texte

The STeaMi board uses this default address. :contentReference[oaicite:3]{index=3}

Le tag `:contentReference[oaicite:3]{index=3}` est un artefact interne de ChatGPT qui a fuité dans le texte. C'est exactement le type de problème qu'une relecture rapide aurait attrapé. À supprimer immédiatement.


🔴 Pas de newline finale

Le fichier se termine sans `\n`. C'est la 3ème PR avec ce problème. Configure ton éditeur pour ajouter automatiquement une newline finale (VS Code : `files.insertFinalNewline: true`).


🟡 Section Examples incomplète

Le README liste 5 exemples :

  • `buttons.py`, `test_basic.py`, `test_interrupts.py`, `test_pin.py`, `test_pin_irq.py`

Mais le dossier `examples/` en contient 9 :

  • `buttons.py`, `i2c_scan.py`, `test_basic.py`, `test_interrupts.py`, `test_led_simple.py`, `test_output.py`, `test_output_active_low.py`, `test_pin.py`, `test_pin_irq.py`

Il manque `i2c_scan.py`, `test_led_simple.py`, `test_output.py` et `test_output_active_low.py`. Fais un `ls lib/mcp23009e/examples/` pour vérifier.


🟡 Section I²C Address — format

- \`0x20\`

Une liste à puce avec un seul élément n'a pas de sens. Les autres drivers utilisent soit un tableau (comme WSEN-PADS avec SAO LOW/HIGH), soit une simple ligne de texte. Pour le MCP23009E, l'adresse dépend des pins A0/A1. Vérifie la datasheet — l'adresse est `0b0100_A2A1A0`, soit `0x20` à `0x27`. Tu pourrais documenter ça proprement :

The base I²C address is \`0x20\` (A0=A1=A2=LOW). On the STeaMi board, the address is \`0x20\`.

🟡 Changement de tirets en puces

Tu as remplacé tous les `-` par `*` dans les listes existantes (API Reference, Constants, etc.). Ce n'est pas faux en Markdown, mais c'est un changement cosmétique non demandé qui pollue le diff. Si le fichier utilisait des `-`, garde des `-`. Ça facilite la revue.


✅ Points positifs

  • Le bon fichier est modifié (`lib/mcp23009e/README.md`)
  • La section Power Management est correcte et correspond au code
  • Le commit message respecte le format
  • La section Examples a été déplacée en fin de fichier — c'est cohérent avec les autres drivers
  • Pas de `exceptions.py` inventé — l'arborescence n'est pas modifiée

Résumé

Problème Sévérité
Artefact ChatGPT `:contentReference` 🔴 Bloquant
Pas de newline finale 🔴 Bloquant
4 exemples manquants dans la liste 🟡 À compléter
I²C address en liste à 1 élément 🟡 Format
Changement `-` → `*` non demandé 🟡 Bruit dans le diff

Corrige les deux 🔴 et les exemples manquants, et ce sera bon.

@Charly-sketch
Copy link
Copy Markdown
Contributor Author

Done : Artefact ChatGPT :contentReference
Done : Pas de newline finale
Done : 4 exemples manquants dans la liste
Done : I²C address en liste à 1 élément
Done : Changement -* non demandé

Should be ready to merge

@nedseb nedseb merged commit c8d5d82 into main Mar 23, 2026
3 checks passed
@nedseb nedseb deleted the mcp23009e-harmonise-readme branch March 23, 2026 15:36
@semantic-release-updater
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Harmonize mcp23009e README — add I2C address and power sections.

3 participants