Download - Basic Programming Blocks
![Page 1: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/1.jpg)
BASIC PROGRAMMING BLOCKSNXT-G
![Page 2: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/2.jpg)
THE NXT CONTROLLER
![Page 3: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/3.jpg)
The BrickOutput Ports
A, B, and C
Three separate motor ports
A B C USB
1 2 3 4
Input ports
1, 2, 3, and 4
Where sensors are attached
![Page 4: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/4.jpg)
Select Buttons
On and Enter
Back and Off
The Brick
![Page 5: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/5.jpg)
Programs are downloaded via a USB cable from the pc to the NXT
The USB Port A B C USB
![Page 6: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/6.jpg)
THE NXT-G INTERFACE
![Page 7: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/7.jpg)
NXT-G Software
Main Working Space
Programming pallete, each containing a set of blocks, hover over each to see
available blocks
NXT Window – Access Brick info.
(e.g., memory,
battery, and so on)
Program name
Common, Complete, and MyBlocks palletes can be
selected here
![Page 8: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/8.jpg)
Add Program
blocks here.
Download and run
immediately
NXT-G Software
Main Working Space
Download (Run from the brick)
Starting point
![Page 9: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/9.jpg)
Robot EducatorA series of 46 lessons split into:
Common – Easier (20)
Complete – Harder (19)
Data Logging – Mixed (7)
Each lesson includes:
Challenge Brief – Video or slides
Building Instructions
Programming Instructions
![Page 10: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/10.jpg)
Written comments
can be added.
Pointer and Selection Tool(default)
Grab Hand to move the work space
around.
![Page 11: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/11.jpg)
Move
Wait For Touch
Display
Sound
Switch (Touch)
Some commonly used blocks
![Page 12: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/12.jpg)
Drag (left-click) block here.
Change the settings in the Configuration
panel.
Release when the
white position preview marks
appear.
Placing Blocks on the working space
Sequence beam
![Page 13: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/13.jpg)
Say “Hello”
Release when the block is connected to the sequence
Sound files, tone, volume, repeat, and wait form completion can be configured. Scroll to find “hello”
![Page 14: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/14.jpg)
Say “Hello”, Display a Smile
Add the display block
Image, text, circle, or line can be configured, offers x,y co-ordinates for positioning
![Page 15: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/15.jpg)
NXT motors & Control Block• The NXT servo motors have a built-in rotation
sensor block that continuously measure and monitors the degrees covered by the motor.
• Motors can be manipulated using the move, motor, and reset blocks.
• The move block synchronizes motor to enable the robot to move straight.
• The move block can control all 3 motors simultaneously. However the power is shared among the 3 motors.
• The block has a built-in system for error correction.
![Page 16: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/16.jpg)
Move block – Configuration panelSelect ports corresponding to
the ports on the NXT
Amount of power used to control the motor
Duration of the action, specified in degrees, duration, time, or
unlimited
Direction
Steering: shares the power among 2 motors, not reliable
at low power
Next Action: Brake causes the robot to come to an immediate stop landing more accurately than coast. The
robot rolls to a coast occasionally overshooting the target.
![Page 17: Basic Programming Blocks](https://reader036.vdocuments.us/reader036/viewer/2022062412/54851b64b4af9ffb2b8b4671/html5/thumbnails/17.jpg)
My First Program