O'Reilly logo

Programming Lego Mindstorms NXT by Owen Bishop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Databases for Robots

Introduction

It is often necessary for an item of data (numeric, logic, text) to be stored away somewhere, and to be retrievable when required. The variable block is useful for this purpose, but has the disadvantage that the stored value is lost when the power is switched off. You might want to keep a value obtained during the running of a program so that it is available the next time the robot is switched on. Examples of this are settings used in calibrating the sensors, and data acquired in games programs.

Another feature that may be required is the ability to store data in an array, so that one particular item of data can be picked out simply by referring to its index (the number of its position) in the array. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required