Brictronics Example NXT Motor program not working


I got my new NXT/EV3 Brick Shield today. And the code will not verify to run. I think I did everything correct.
Can someone tell me which drivers I need to download. I think I got the right ones.

When I try to veriy the program in the arduino IDE I get the following error.

sketch_feb16a:24: error: ‘Bricktronics’ does not name a type
sketch_feb16a:25: error: ‘Motor’ does not name a type
sketch_feb16a.ino: In function ‘void setup()’:
sketch_feb16a:31: error: ‘brick’ was not declared in this scope
sketch_feb16a:32: error: ‘m’ was not declared in this scope
sketch_feb16a.ino: In function ‘void loop()’:
sketch_feb16a:40: error: ‘m’ was not declared in this scope

Anybody else get this?


Hey there, thanks for the post. We recently split the Bricktronics software drivers into multiple libraries, so there are now multiple libraries you need to install, depending on which NXT/EV3 motors/sensors you want to use. The entire list, and the new software architecture, is explained here in this blog post:

At the very least you will want to install the BricktronicsShield library:

Since you’re using motors, you’ll want to install the BricktronicsMotor library, too:

From the errors you posted, I think you might be using one of the original code example sketches, so I would suggest installing the BricktronicsShield and BricktronicsMotor libraries, and checking out the new and improved examples included in the BricktronicsMotor library.

Let us know how it goes!