Ray Kholodovsky - "Can I ask parts-engine a que...

"Can I ask parts-engine a question or is it only run automatically during compile?"

I'm mentally architecting my modules, starting with a simple one like "Power LED", which I want to use a calculation to set the LED brightness to a particular target based on the provided input voltage, and return an LED and a resistor of appropriate value.

We discussed all this here before: https://github.com/orgs/tscircuit/discussions/763

The question now, is when my calculator returns an exact value of 6250 ohms, can I ask parts-engine to find the nearest size that is under the basic list? Or do I have to bring in that list myself and handle all of that selection logic myself in my userland module?
GitHub
As we discussed here, we can do expressions and basic math right in TSX, cool! https://discord.com/channels/1233487248129921135/1353415621995397172/1413333949417259098 However, I think it might be ...
Was this page helpful?