Function to associate objects to devices
Forgot to actually build devices.c