Home > Arduino, Development boards, TKJ Electronics > NXT Shield Library

NXT Shield Library

After several questions on how to use the NXT Shield I decided to create an Arduino library. All the code is available at github: https://github.com/TKJElectronics/NXTShield.
The library is pretty easy to use, I have provided three examples witch demonstrates all the libraries functionalities.

I works with all official Arduinos including Arduino Mega. To use the ultrasonic sensor with an Arduino Mega, one have to connect pin 20 (SDA) to A4 and pin 21 (SCL) to A5. A new revision of the shield might use the two extra SDA and SCL pins that are near to the AREF pin on r3 versions of the new Arduino boards.

Below are some photos of the NXT Shield:

[nggallery id=4]

  1. Shoriya Chauhan
    September 6th, 2019 at 10:34 | #1


    Wanted to understand why is the shield necessary? Can we connect the Lego motors and Arduino directly?? And use the library for the communication ?

  2. September 8th, 2019 at 10:21 | #2

    @Shoriya Chauhan
    No, the NXT motor can not be directly connected to the Arduino.
    The NXT shield contains the necessary DC motor driver H-bridge for controlling the current through the motor together with analog to digital filters (schmitt trigger) for the encoder signals.

  1. February 17th, 2013 at 15:02 | #1
  2. February 17th, 2013 at 15:25 | #2