Invalid device error when downloading code to V5 brain

Hi, we are trying to download our code onto the V5 Brain for the autonomous part of the spin up competition but we keep receiving the “invalid device error” all the ports are assigned and physically plugged in correctly on both our code and the Brain, so we are unsure what is causing this error.

Any help would be greatly appreciated.

Could you send your code using ``` on both sides?

If you do not feel comfortable sending it here feel free to dm me!


The image isn’t loading.

1 Like

It’s just a purple square for me… You too?

1 Like

Sorry about that, this is the error we are receiving.

It appears that one of your blocks is using a device (motor etc) that isn’t registered anymore. Scroll through your code and look for something that is using a motor or device that doesn’t exist on the panel on the right.

Can you send it in a .zip file? It probably means you are using a motor that was deleted or not declared.

Fair warning: not familiar with block coding so I could be off

1 Like

This looks like you have put a few blocks into yout code using either a sensor and a motor, and then removed that motor from the port setup part of your code. To fix this, I’d recommend taking a close look through all your code and reselecting which motor/sensor you want to use in all the blocks that require that.

+1, sometimes even if you change the port they can get unlinked, it might be beneficial to convert to text and see if it runs, if it does, go through the blocks and re select all the devices in the code, if it does not, check the motor names and that they sync up

1 Like

Oddly enough, a long time ago I used to get errors for creating a variable but never using it, and I think this might’ve been that error. Maybe check if you have any extra unused/purposeless variables?