BricktronicsUltrasonic v1.2 - A software library for LEGO NXT ultrasonic sensors.
More details at http://www.wayneandlayne.com/bricktronics/
To Download
<arduinosketchfolder>/libraries/
folder. You may need to create the libraries subfolder if this is your first installed library. Restart the Arduino IDE.API Highlights
BricktronicsUltrasonic(uint8_t sclPin, uint8_t sdaPin)
- Constructorvoid begin()
- Call the begin function in your setup() functionuint8_t getDistance()
- Basic ultrasonic sensor read function. Returns the latest sensor reading, returns 0 in case of error. Measured distance is in units of centimeters.If you want to use ultrasonic sensors with your Bricktronics Shield or Megashield, you may also be interested in these libraries:
Wayne and Layne, LLC and our products are not connected to or endorsed by the LEGO Group. LEGO, Mindstorms, and NXT are trademarks of the LEGO Group.