### Read VEML7700 Ambient Light Sensor via I²C Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/usage-guide.md Demonstrates reading ambient light data from the VEML7700 sensor using the Wire library. ```c // Pseudo-code for typical usage #include #define VEML7700_ADDR 0x10 void setup() { Wire.begin(); } void loop() { // Read ambient light Wire.beginTransmission(VEML7700_ADDR); Wire.write(0x04); // ALS register Wire.endTransmission(); Wire.requestFrom(VEML7700_ADDR, 2); uint16_t lux = (Wire.read() << 8) | Wire.read(); // lux now contains light sensor reading } ``` -------------------------------- ### Define Library Metadata in library.lp Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/library-structure.md Use this structure to define the core metadata for a LibrePCB library, including UUID, name, and versioning. ```lisp (librepcb_library (name "Display Name") (description "Description") (keywords "tag1,tag2") (author "Author Name") (version "X.Y.Z") (created TIMESTAMP) (deprecated false) (url "Repository URL") (dependency ) (manufacturer "Manufacturer") ) ``` -------------------------------- ### View Library File Structure Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/index.md Displays the directory layout of the Adafruit library workspace. ```text /workspace/home/output/ ├── index.md ← This file ├── api-reference-devices.md ← Device definitions ├── api-reference-components.md ← Component definitions ├── api-reference-packages.md ← Physical packages ├── signals-and-pins.md ← Signal mappings ├── library-structure.md ← Format & structure └── usage-guide.md ← Integration guide ``` -------------------------------- ### Define Device in device.lp Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/library-structure.md Links a component to a package and defines pad mappings and manufacturer part numbers. ```lisp (librepcb_device (name "Device Name") (description "Description") (component ) (package ) (pad (optional false) (signal )) (part "MPN" (manufacturer "Mfg")) ) ``` -------------------------------- ### Library File Structure Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/README.md Visual representation of the library directory layout and key documentation files. ```text /workspace/home/output/ ├── README.md ← This file ├── index.md ← Start here │ ├── api-reference-devices.md ← Device specs ├── api-reference-components.md ← Component specs ├── api-reference-packages.md ← Package specs ├── signals-and-pins.md ← Signal mappings │ ├── library-structure.md ← Format & structure ├── usage-guide.md ← Integration guide └── complete-reference.md ← All UUIDs & paths ``` -------------------------------- ### Retrieve Library Metadata Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/complete-reference.md Displays the core library identification and configuration details from library.lp. ```text Library UUID: 0120d71f-d2f7-4e52-8a11-80ada981ad5f Name: Adafruit Version: 0.2.1 Author: LibrePCB Manufacturer: Adafruit License: CC0-1.0 (Creative Commons Public Domain) Created: 2019-06-13T08:43:28Z Repository: https://github.com/LibrePCB-Libraries/Adafruit.lplib Deprecated: false Description: Adafruit products (unofficial) Keywords: adafruit ``` -------------------------------- ### Define Package in package.lp Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/library-structure.md Specifies physical package details including assembly type, grid interval, pads, and footprints. ```lisp (librepcb_package (name "PACKAGE_NAME") (description "Description") (assembly_type tht) (grid_interval 2.54) (pad (name "PadName")) (footprint (name "Variant")) ) ``` -------------------------------- ### Define Component in component.lp Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/library-structure.md Defines a component's properties, signals, and variants within the LibrePCB library structure. ```lisp (librepcb_component (name "Component Name") (description "Description") (keywords "tags") (author "Author") (version "X.Y.Z") (created TIMESTAMP) (deprecated false) (category ) (schematic_only false) (prefix "U") (signal (name "SignalName") (role passive) ...) (variant (name "default") ...) ) ``` -------------------------------- ### VEML7700 Light Sensor Integration Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/README.md Displays the I2C master connection pattern and power requirements for the VEML7700 breakout board. ```text Microcontroller (I²C Master) ↓ [VEML7700 Breakout] ├─ Fixed I²C Address: 0x10 ├─ Power: 3.0V-5.0V ├─ Signals: GND, Vin, SCL, SDA └─ Output: 3Vo (3.3V option) ``` -------------------------------- ### SWD Debug Header Layout Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/README.md Defines the standard pinout for an ARM Cortex-M 10-pin 1.27mm Serial Wire Debug connector. ```text Programmer (ST-Link, J-Link, etc.) ↓ [SWD Header 10-pin 1.27mm] ├─ VDD: Target power ├─ SWCLK: Debug clock ├─ SWDIO: Debug data └─ GND: Ground ``` -------------------------------- ### Device and Component UUID Reference Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/README.md Table mapping specific Adafruit devices and components to their unique LibrePCB identifiers. ```markdown | Device | UUID | |--------|------| | VEML7700 (Device) | `e6b31596-3f12-465b-bc58-96c49b91aa9c` | | TCA9548A (Device) | `2c67e4d5-e2b1-4d65-8676-bbd15665b5bd` | | SWD Header (Device) | `7f909383-6ffb-48ce-b340-e60d31396a2f` | | VEML7700 (Component) | `107d2abc-3ca9-4a57-b7f6-a7f3dd6cf1f8` | | TCA9548A (Component) | `bb589773-ddb6-421c-b08e-f15bd92eb5c9` | | Library | `0120d71f-d2f7-4e52-8a11-80ada981ad5f` | ``` -------------------------------- ### TCA9548A Multiplexer Configuration Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/README.md Illustrates the I2C multiplexing pattern for managing multiple devices with identical addresses. ```text I²C Master ↓ [TCA9548A] ├─ Address: 0x70-0x77 (configurable via A0, A1, A2) └─ Channels: 8 independent I²C buses (SC0-SC7, SD0-SD7) ├─ Device with Address 0x50 on Channel 0 ├─ Device with Address 0x50 on Channel 1 └─ ... up to 8 devices ``` -------------------------------- ### Select TCA9548A I²C Multiplexer Channel Source: https://github.com/librepcb-libraries/adafruit.lplib/blob/master/_autodocs/usage-guide.md Provides a function to switch active I²C channels on a TCA9548A multiplexer. ```c // Pseudo-code for channel selection #include #define TCA9548A_ADDR 0x70 // Assuming A0=A1=A2=GND void selectChannel(uint8_t channel) { Wire.beginTransmission(TCA9548A_ADDR); Wire.write(1 << channel); // Set channel bit Wire.endTransmission(); } void setup() { Wire.begin(); } void loop() { // Read from sensor on channel 0 selectChannel(0); // I²C commands here reach only channel 0 // (other devices not accessible) // Switch to channel 1 selectChannel(1); // I²C commands here reach only channel 1 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.