Skip to content

Instantly share code, notes, and snippets.

@nsdevaraj
Created December 13, 2025 13:40
Show Gist options
  • Select an option

  • Save nsdevaraj/495a16b05d5ed737cde3b06653b59649 to your computer and use it in GitHub Desktop.

Select an option

Save nsdevaraj/495a16b05d5ed737cde3b06653b59649 to your computer and use it in GitHub Desktop.
'''mermaid
graph TD
subgraph "Pen Housing"
subgraph "Power Subsystem"
A[Rechargeable Battery<br/>(e.g., Li-Po)] --> B[Power Management IC<br/>(Regulator & Charging Circuit)];
B --> |VCC| C;
B --> |VCC| G;
B --> |VCC| H;
end
subgraph "Main Processing Unit"
C[Microcontroller Unit (MCU)<br/>with Integrated Bluetooth Low Energy (BLE)];
D[PCB Trace Antenna] <--> |RF Signal| C;
end
subgraph "Input Switches"
E[Side Button Switch<br/>(Right Click)] --> |GPIO Signal| C;
F[Pen Tip Pressure Switch<br/>(Left Click)] --> |GPIO Signal| C;
end
subgraph "Optical Navigation Subsystem (At Pen Tip)"
G[Optical Mouse Sensor IC];
H[Infrared (IR) LED];
I[Lens Assembly<br/>(Prism & Focusing Lens)];
G --> |Control| H;
G --> |Motion Data (SPI/I2C)| C;
H -.-> |IR Light Path| I;
I -.-> |Reflected Light Path| G;
end
J[Writing Surface]
I -.-> |Illumination| J
J -.-> |Reflection| I
end
style C fill:#f9f,stroke:#333,stroke-width:2px
style G fill:#ccf,stroke:#333,stroke-width:2px
style E fill:#ff9,stroke:#333,stroke-width:1px
style F fill:#ff9,stroke:#333,stroke-width:1px
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment