### LibrePCB Library Installation Instructions Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Provides two methods for installing the Cree LED library into a LibrePCB project: cloning the repository directly into the local libraries directory or adding it as a remote library via the LibrePCB GUI. Includes a command to verify the library's integrity. ```bash # Method 1: Clone directly into LibrePCB libraries directory cd ~/.local/share/librepcb/libraries/local/ git clone https://github.com/LibrePCB-Libraries/Cree.lplib.git # Method 2: Add as remote library in LibrePCB # In LibrePCB: Tools → Library Manager → Add Remote Library # URL: https://github.com/LibrePCB-Libraries/Cree.lplib # Verify library integrity librepcb-cli open-library --all --strict --check --minify-step Cree.lplib/ # Expected output: # Open library 'Cree.lplib/'... # Process all elements... # Check library... # SUCCESS ``` -------------------------------- ### Verify Library Installation using librepcb-cli Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This bash command uses the librepcb-cli tool to open a library and verify that all dependencies are installed. The `--all` flag ensures that all components, symbols, and categories are checked for the specified library. ```bash # Verify all dependencies are installed librepcb-cli open-library --all Cree.lplib/ ``` -------------------------------- ### Install LibrePCB Base Library Dependency Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This command clones the LibrePCB Base library from its official GitHub repository. This is a prerequisite for using the Cree LED library, as it provides shared components and definitions. ```shell cd ~/.local/share/librepcb/libraries/local/ git clone https://github.com/LibrePCB-Libraries/LibrePCB_Base.lplib.git ``` -------------------------------- ### Add Custom Cree LED Device Variant (S-expression) Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This S-expression template demonstrates how to add a new device variant for a Cree JB3030 LED. It defines attributes like power rating, forward voltage, color temperature (CCT), and color rendering index (CRI). The CRI_CODE and CCT_CODE are mapped to specific values, and an example shows how to create a 3000K CRI 80 variant. ```lisp # Add to dev/0cdaca73-8d0e-4dc7-a8d9-1e1b468d19aa/device.lp # Template for new JB3030 3V part variant (part "JB3030AWT-P-[CRI_CODE][CCT_CODE]EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "[CCT] K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "[CRI]")) (attribute "COLOR" (type string) (unit none) (value "white")) ) # CRI_CODE mapping: # B = CRI 70 # H = CRI 80 # U = CRI 90 # CCT_CODE mapping: # 22 = 2200 K (warm) # 27 = 2700 K # 30 = 3000 K # 35 = 3500 K # 40 = 4000 K (neutral) # 50 = 5000 K # 57 = 5700 K # 65 = 6500 K (cool) # Example: Add 3000K CRI 80 part (part "JB3030AWT-P-H30EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "3000 K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "80")) (attribute "COLOR" (type string) (unit none) (value "white")) ) # After adding, validate with: # librepcb-cli open-library --all --strict --check . ``` -------------------------------- ### LibrePCB SMT Package Definition - CREE_Jx3030 Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Defines the SMT package footprint for Cree J Series 3030 LEDs. Includes pad definitions, silkscreen, and documentation layers according to datasheet recommendations and LibrePCB constraints. ```lisp (librepcb_package ad3fb64f-2c73-4668-bb4c-2b4a34958a70 (name "CREE_Jx3030") (description "Solder pads according to recommendations in datasheet (https://www.mouser.de/datasheet/2/90/data-sheet-JSeries-3030-1224352.pdf) within the constraints allowed by LibrePCB.") (keywords "venture,j-series") (author "J. R. Schmid") (version "0.2") (created 2020-05-23T14:20:05Z) (deprecated false) (generated_by "") (category 0764a19f-0b33-4927-906a-f4d6c522841d) (category 122a5d91-f92d-4bfb-a9a4-9e71d8e56117) (assembly_type smt) (pad 3cbbb83b-6dfd-422b-95b5-b31600bb290d (name "C")), (pad 44222ae2-bc33-41d3-b585-fcdd5331e55a (name "A")) (footprint d7ce9a67-0071-4fd6-b350-4f01dc11dd09 (name "default") (description "") (3d_position 0.0 0.0 0.0) (3d_rotation 0.0 0.0 0.0) (pad 3cbbb83b-6dfd-422b-95b5-b31600bb290d (side top) (shape roundrect) (position -0.71 0.0) (rotation 0.0) (size 1.3 2.4) (radius 0.0) (stop_mask auto) (solder_paste auto) (clearance 0.0) (function standard) (package_pad 3cbbb83b-6dfd-422b-95b5-b31600bb290d) ) (pad 44222ae2-bc33-41d3-b585-fcdd5331e55a (side top) (shape roundrect) (position 1.06 0.0) (rotation 0.0) (size 0.6 2.4) (radius 0.0) (stop_mask auto) (solder_paste auto) (clearance 0.0) (function standard) (package_pad 44222ae2-bc33-41d3-b585-fcdd5331e55a) ) (polygon 2cc0899f-7b4d-4421-bc36-0a8bec8f9727 (layer top_legend) (width 0.1) (fill false) (grab_area true) (vertex (position -1.56 1.56) (angle 0.0)) (vertex (position 1.56 1.56) (angle 0.0)) (vertex (position 1.56 -1.56) (angle 0.0)) (vertex (position -1.56 -1.56) (angle 0.0)) (vertex (position -1.56 1.56) (angle 0.0)) ) (circle 8d009fbb-d3ce-4999-a176-c524261a4ec8 (layer top_legend) (width 0.0) (fill true) (grab_area false) (diameter 0.2) (position -1.8 -1.8) ) (stroke_text a0f15692-970c-494d-a8b2-04bb1269a6ae (layer top_names) (height 1.0) (stroke_width 0.2) (letter_spacing auto) (line_spacing auto) (align center bottom) (position 0.0 2.2) (rotation 0.0) (auto_rotate true) (mirror false) (value "{{NAME}}") ) (stroke_text c768f800-4b81-4c27-aa51-5daca75ebcbb (layer top_values) (height 1.0) (stroke_width 0.2) (letter_spacing auto) (line_spacing auto) (align center top) (position 0.0 -2.2) (rotation 0.0) (auto_rotate true) (mirror false) (value "{{VALUE}}") ) ) (approved missing_footprint_3d_model (footprint d7ce9a67-0071-4fd6-b350-4f01dc11dd09) ) ) ``` -------------------------------- ### LibrePCB Library Directory Structure Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Illustrates the standard directory layout for a LibrePCB component library, including main metadata, shared packages, package categories, and device definitions. This structure helps in organizing and managing library components. ```bash repo/ ├── library.lp # Main library metadata ├── pkg/ad3fb64f-2c73-4668-bb4c-2b4a34958a70/ # Shared package │ └── package.lp # CREE_Jx3030 footprint ├── pkgcat/122a5d91-f92d-4bfb-a9a4-9e71d8e56117/ # Package category │ └── package_category.lp └── dev/ # Device definitions ├── 0cdaca73-8d0e-4dc7-a8d9-1e1b468d19aa/ # JB3030 3V (0.2W, 21 parts) │ └── device.lp ├── 6ee5b5bb-b885-4b25-8bbf-68f0fdb98828/ # JK3030 6V (1W, 22 parts) │ └── device.lp └── af366125-3e8b-4032-8e11-0404ebcb3366/ # JK3030 3V (1W, 21 parts) └── device.lp # Device part naming pattern JB3030AWT-P-[B/H/U][CCT]EA0000-N0000001 │ └─┬─┘ └─┬─┘ │ │ └─── Color temperature (27=2700K, 65=6500K) │ └───────── CRI rating (B=70, H=80, U=90) └──────────────── Power series (JB=0.2W, JK=1W) ``` -------------------------------- ### Parse Device Attributes with Python Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This Python script parses a device.lp file to extract part variants and their specifications. It uses regular expressions to match part definitions and their attributes, then returns a list of parts with their manufacturer, part number, and attributes. ```python import re def parse_device_attributes(device_file_path): """Extract all part variants and their specifications from a device.lp file.""" parts = [] with open(device_file_path, 'r') as f: content = f.read() # Regex to match part definitions part_pattern = r'\(part "([^"]+)" \(manufacturer "([^"]+)"\)(.*?)\n \)' for match in re.finditer(part_pattern, content, re.DOTALL): part_number, manufacturer, attributes = match.groups() # Extract attributes attr_pattern = r'\(attribute "([^"]+)" \(type ([^)]+)\) \(unit ([^)]+)\) \(value "([^"]+)"\)\)' attrs = {} for attr_match in re.finditer(attr_pattern, attributes): name, type_, unit, value = attr_match.groups() attrs[name] = {'type': type_, 'unit': unit, 'value': value} parts.append({ 'part_number': part_number, 'manufacturer': manufacturer, 'attributes': attrs }) return parts # Usage parts = parse_device_attributes('dev/0cdaca73-8d0e-4dc7-a8d9-1e1b468d19aa/device.lp') for part in parts: print(f"{part['part_number']}: " f"{part['attributes']['NOMINAL_CCT']['value']}, " f"CRI {part['attributes']['MINIMUM_CRI']['value']}, " f"{part['attributes']['POWER_RATING']['value']}W") ``` -------------------------------- ### LibrePCB Library Definition Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Defines the root configuration for the LibrePCB library, including metadata, version, author, and dependencies. This S-expression format is standard for LibrePCB library files. ```lisp (librepcb_library cb2a5d4e-c784-4d14-8d82-033285fd4843 (name "Cree") (description "LEDs by Cree (unofficial).") (keywords "cree,leds") (author "LibrePCB") (version "0.2") (created 2020-06-14T16:51:51Z) (deprecated false) (url "https://github.com/LibrePCB-Libraries/Cree.lplib") (dependency a9ddf0c6-9b1c-4730-b300-01b4f192ad40) (manufacturer "CreeLED") ) ``` -------------------------------- ### LibrePCB Library CI Pipeline (GitHub Actions) Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt A GitHub Actions workflow configured to automatically validate the LibrePCB library on push and pull request events. It utilizes the `librepcb-cli` within a Docker container for consistent testing environments. ```yaml name: CIon: [push, pull_request] jobs: check: runs-on: ubuntu-22.04 container: image: librepcb/librepcb-cli:1.0.0-rc1 options: --entrypoint /bin/bash steps: - uses: actions/checkout@v1 - run: librepcb-cli open-library --all --strict --check --minify-step . ``` -------------------------------- ### Check Library Dependencies with grep Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This bash command checks for library dependencies within a library.lp file. It uses grep to search for the string "dependency" and outputs the lines where it is found. This helps identify the UUIDs of required libraries. ```bash # Check library dependencies grep -r "dependency" library.lp ``` -------------------------------- ### Filter Parts by Specifications with Python Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt This Python script filters LED parts based on CRI and color temperature requirements from a device file. It depends on the `parse_device_attributes` function. It takes the device file path and minimum CRI, minimum CCT, and maximum CCT as input, returning a list of matching parts. ```python def filter_parts_by_specs(device_file, min_cri=80, min_cct=4000, max_cct=5000): """Filter LED parts by CRI and color temperature requirements.""" parts = parse_device_attributes(device_file) matching = [] for part in parts: cri = int(part['attributes']['MINIMUM_CRI']['value']) cct = int(part['attributes']['NOMINAL_CCT']['value'].split()[0]) if cri >= min_cri and min_cct <= cct <= max_cct: matching.append(part) return matching # Find all 80+ CRI parts with neutral white (4000-5000K) devices = [ 'dev/0cdaca73-8d0e-4dc7-a8d9-1e1b468d19aa/device.lp', # JB3030 3V 'dev/6ee5b5bb-b885-4b25-8bbf-68f0fdb98828/device.lp', # JK3030 6V 'dev/af366125-3e8b-4032-8e11-0404ebcb3366/device.lp' # JK3030 3V ] for device in devices: matches = filter_parts_by_specs(device, min_cri=80, min_cct=4000, max_cct=5000) print(f"\n{device.split('/')[-2]}:") for match in matches: print(f" {match['part_number']}: " f"{match['attributes']['NOMINAL_CCT']['value']}, " f"CRI {match['attributes']['MINIMUM_CRI']['value']}, " f"{match['attributes']['FORWARD_VOLTAGE']['value']}V") ``` -------------------------------- ### LibrePCB Package Category Definition Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Defines an organizational category for grouping Cree packages within the LibrePCB hierarchy. This S-expression format specifies the category's name, description, and parent category. ```lisp (librepcb_package_category 122a5d91-f92d-4bfb-a9a4-9e71d8e56117 (name "Cree") (description "Custom packages by Cree.") (keywords "cree") (author "LibrePCB") (version "0.1") (created 2020-06-14T16:57:58Z) (deprecated false) (parent 194951ec-03dd-412a-9828-70c40bbdd22d) ) ``` -------------------------------- ### Cree JB3030 3V LED Device Definition (LibrePCB Lisp) Source: https://context7.com/librepcb-libraries/cree.lplib/llms.txt Defines the Cree JB3030 3V LED with multiple variants, specifying attributes like power rating, forward voltage, color temperature, and CRI. This Lisp-formatted code is used by LibrePCB for component definition. ```lisp (librepcb_device 0cdaca73-8d0e-4dc7-a8d9-1e1b468d19aa (name "Cree JB3030 3V") (description "J Series® LEDs extend Cree's industry-leading portfolio of lighting-class LEDs to a broader set of applications. The J Series 3030 Standard LEDs combine high efficacy and excellent value in a reliable package. The J Series 3030 Standard LEDs are optimized for applications where high efficacy and smooth appearance are critical, such as troffers, panel and outdoor area lights.") (keywords "venture,j-series") (author "J. R. Schmid") (version "0.2") (created 2020-05-23T18:40:48Z) (deprecated false) (generated_by "") (category 70421345-ae1d-4fed-aa60-e7619524b97f) (component 2b24b18d-bd95-4fb4-8fe6-bce1d020ead4) (package ad3fb64f-2c73-4668-bb4c-2b4a34958a70) (pad 3cbbb83b-6dfd-422b-95b5-b31600bb290d (signal 7b023430-b68f-403a-80b8-c7deb12e7a0c)) (pad 44222ae2-bc33-41d3-b585-fcdd5331e55a (signal f1467b5c-cc7d-44b4-8076-d729f35b3a6a)) (part "JB3030AWT-P-B65EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "6500 K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "70")) (attribute "COLOR" (type string) (unit none) (value "white")) ) (part "JB3030AWT-P-H65EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "6500 K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "80")) (attribute "COLOR" (type string) (unit none) (value "white")) ) (part "JB3030AWT-P-B40EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "4000 K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "70")) (attribute "COLOR" (type string) (unit none) (value "white")) ) (part "JB3030AWT-P-H27EA0000-N0000001" (manufacturer "CreeLED") (attribute "POWER_RATING" (type power) (unit watt) (value "0.2")) (attribute "FORWARD_VOLTAGE" (type voltage) (unit volt) (value "3")) (attribute "NOMINAL_CCT" (type string) (unit none) (value "2700 K")) (attribute "MINIMUM_CRI" (type string) (unit none) (value "80")) (attribute "COLOR" (type string) (unit none) (value "white")) ) ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.