background preloader

Klocki lego

Facebook Twitter

Beginning Datalogging with the LEGO MINDSTORMS NXT. Beginning Datalogging with the LEGO MINDSTORMS NXT --- Brian Davis Preamble – Why I Bother.

Beginning Datalogging with the LEGO MINDSTORMS NXT

On several occasions, people have asked me to help them with datalogging, so I thought I’d put this little guide together and put it on-line for the community. I’m choosing here to use NXT-G, because it’s the environment that most people have access to for the LEGO NXT microcontroller (and one I have some experience with), but the ideas here are much more general.

If you use a different language (RobotC, pbLua, NXC, etc.) or even a different platform (BASIC microstamp, RCX, etc.) many of the ideas are the same, just the implementation changes. And some of these languages offer advantages over NXT-G in speed or data manipulation as well, so please use whatever you choose What is Datalogging The basic idea of datalogging is to run an experiment, but have a computer do the tedious data recording for you. Beginning Datalogging Fig 1-1: a minimal datalogging program. {Link to Logger1.rbt} Parting Thoughts. Beginning Datalogging with the LEGO MINDSTORMS NXT. Sensors and Sensing. You "see" colors, geometry, distance, spatial continuity and discontinuity, motion, connectedness and adjacency.

Sensors and Sensing

These notions are built into the ways in which you experience and think about the world. You interpret the information returned to your senses through a rich model of the world. The robots you build will not have such a model unless you supply it. Moreover the simple touch, light and rotation sensors that your robots will use to sense the world are very different from your tactile, visual and proprioceptive sensors and, hence, your intuitions and models may not be appropriate to apply to interpreting Lego sensors. The sensors designed for the Lego Mindstorms RIS are fairly well behaved as sensors go.

Lego Touch Sensor Consider the Lego touch sensor; this device consists of nothing more than a contact switch held open with a spring and wired in series with a load resistor. Simple mechanical switches such as the Lego touch sensor tend to bounce when pressed. Line Follower Algorithm - Which is the best? PID Controller For Lego Mindstorms Robots. A PID Controller is a common technique used to control a wide variety of machinery including vehicles, robots and even rockets.

PID Controller For Lego Mindstorms Robots

The complete mathematical description of a PID Controller is fairly complex but a much simpler understanding is really all that is needed to use a PID effectively. This document is a description of how to create a PID Controller for use with Lego Mindstorms Robots using the NXT-G programming language. It will be easier if we have an actual task in mind so I will describe how to create a PID to do line following. Once created, the same PID can be used, with only minor modifications, with any other Mindstorms application such as getting a robot that can drive as straight as possible, or even for a robot that can balance with nothing but 2 wheels touching the ground like a Segway. A PID is really pretty straight forward and the typical description of a PID is easily understood by anyone that has had Calculus.

Lets try to fix that. Y = mx + b y = mx. Download4.07 – RWTH - Mindstorms NXT Toolbox. Toolbox download ¶ Download the full toolbox below, including all functions with sourcecodes, documentation, examples and demos.

Download4.07 – RWTH - Mindstorms NXT Toolbox

For installation see the included README.txt file or the installation guide below on this site. RWTHMindstormsNXTv4.07.zip (0.92 MB) System Requirements ¶ Operating system: Windows, Linux, or Mac OS MATLAB Version 7.7 (R2008b) or higher LEGO® Mindstorms NXT building kit (e.g. What's new & release notes ¶ Browse the complete Release History (also available in section "Release Notes" inside MATLAB on the Toolbox help page). Software requirements, utilities, and drivers ¶ Browse this release ¶ Browse files of the current release in our SVN repository:/tags/version-4.07/RWTHMindstormsNXT. Light Sensor Calibration. Lego NXT PID line follower. Implementing a PID Controller using the RWTH-Mindstorms NXT Toolbox.

Writing Archive. Index of /wp-content/uploads/2012/11. LineFollowing.wmv. Lego Mindstorms NXT Simple Line Follower. LEGO Mindstorms Sudoku Solver. Reference Catalog - Inventory of Set 9797-1. 9797_parts. 069.