I would like to polish my text and am not sure what would be the proper use of preposition in this phrase:
The idea of event loop is a perfect fit to the basic Arduino concept.
or
The idea of event loop is a perfect fit in the basic Arduino concept.
Context: there is a software solution that uses event loop as its main execution block and this fits perfectly (in/to) the concept of infinite loop used in every Arduino program (the infinite loop is an inseparable part of every program in Arduino framework).
Best Answer
Let's compare examples culled from Google search:
As you can see above,
Based on the analysis above, and knowing the programming technique you are talking about, I think the best preposition would be "with", since you use the technique together with the concept of the Arduino hardware that is designed for real-time, event-driven controller projects.
But if you want to emphasize the purpose then you would use for, meaning a programming technique for the Arduino hardware.