// Howdy 👋.
//
// This is where you can create powerful part automations like resistors that tell you when too much current is flowing through them
// You can also create your own flexible parts, like generics (https://docs.flux.ai/Introduction/generic-parts)
//
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/reference/introduction
//
// We also have a Flux Slack Community in case you need help: https://www.flux.ai/p/slack-community
//
// To infinity and beyond 🚀
/*let mcu = project.getComponentByName("U1", "U2","U3"); // Replace U1 with actual MCU name
let caps = project.getComponentsByType("C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "C11", "C12", "C13", "C14", "C15", "C16", "C17", "C18", "C19", "C20");
let resistors = project.getComponentsByType("R1", "R2", "R3", "R4", "R5", "R6", "R7");
caps.forEach(caps => {
caps.placeNear(mcu, { distance: 5 });
});
resistors.forEach(r => {
r.placeNear(mcu, { distance: 10 });
});
project.autoRoute();*/
export async function main(project) {
// Get components by their designators
let mcu = project.getComponentByName("U1", "U2", "U3");
// let r1 = project.getComponentByName("R1");
let caps = project.getComponentsByType("C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10", "C11", "C12", "C13", "C14", "C15", "C16", "C17", "C18", "C19", "C20");