Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Smart LEGO MINDSTORMS EV3 Robots

You're reading from   Building Smart LEGO MINDSTORMS EV3 Robots Leverage the LEGO MINDSTORMS EV3 platform to build and program intelligent robots

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788471565
Length 258 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Kyle Markland Kyle Markland
Author Profile Icon Kyle Markland
Kyle Markland
Arrow right icon
View More author details
Toc

Programming

Now we need to write a program that makes this smart tank move. We will be using EV3-G, the graphical programming language designed for the EV3.

Setting up the program

Before we start to write the program, we need to assign port numbers to both of the IR sensors. The program makes use of both of the IR sensors on the robot. The IR sensor that is mounted to the robot's chassis is plugged into port 1, so we will refer to this sensor as IR 1. The sensor mounted to the turret is plugged into port 2, so we will refer to that sensor as IR 2. It is imperative to remember this because the program identifies these sensors using their port numbers. We use the port numbers to tell the robot which sensor to check at any...

You have been reading a chapter from
Building Smart LEGO MINDSTORMS EV3 Robots
Published in: Apr 2018
Publisher: Packt
ISBN-13: 9781788471565
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime