SlideShare a Scribd company logo
1 of 11
NXT LIGHT SENSOR WITH NXT
PROGRAMMED IN EV3-G
LEÇON DE
PROGRAMMATION
POUR DÉBUTANT
LESSON OBJECTIVEs
• Learn how to use the NXT Light sensor with an NXT brick using EV3-G
programming
2©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
Using a light sensor with NXT in EV3-g
• How can we make a light sensor work with the EV3
software and NXT brick?
• Pretend it is a sound sensor (Beginner)
• Use the Raw Sensor Block (Advanced)
• This lesson will cover the beginner level
3
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM
(5/2017)
Downloading the Sound Block
• The Sound Sensor Block is
available for download on the
LEGO.com site:
• http://www.lego.com/en-
us/mindstorms/downloads
• Download the block using the
“Importing Additional Blocks
Lesson” in Beginner in
EV3Lessons.com
• Note: If you are using the EDU
software, the block will already
be in your palette
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017) 4
Using the light sensor with the sound
sensor block
5
• Once you install the sound sensor block, you can select the sound
sensor for any loop, switch, or wait block.
• The “sound” sensor has two settings:
• In dB mode, it shines a red light and measures how much light is
reflected. (Reflected light mode) A red light comes from the sensor
whenever it is working in dB mode. White surfaces give a high
(~70) reading. Black surfaces give a low (~20) reading.
• In dBa mode, it looks for ambient light. (Ambient Light Mode) The
red light will not be on.
• Don’t worry about using a sound sensor in your program when you
really have a light sensor connected. Everything works just fine.
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM
(5/2017)
Example Usage: Reading the Light
Sensor & Displaying
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM
(5/2017)
6
Reflected Light mode
Ambient Light mode
COLOR SENSOR CHALLENGE
Now that you know how to use the
NXT Light sensor, can you use it to
make the robot move up to a black
line using the color sensor?
Step 1: Use Wait For NXT Sound
Sensor (NXT Light)
Step 2: Use the NXT Sound Sensor in
Compare dB mode
Step 3: To know what value to use,
you will have to use Port View to
determine what the NXT Light
sensor reads for Black (refer to the
”Port View” Lesson in Beginner in
EV3Lessons.com. Note that for the
NXT, this is called “View  Light”)
Hint: You will use Move Steering
(think about motor on and off) and
Wait for “Color”
© EV3LESSONS.COM, 2016, (LAST EDIT: 7/04/2016) 7
Color Sensor Challenge Solution
FINISH
START
Move Steering
Set to “OFF”
with BRAKE
Move Steering
Set to “ON”
Wait until Color is
Black (threshold
<40 determined
using View)
8
Using your NXT light sensor with other
EV3 programs
9
• When can we substitute a “sound” (really light) sensor for a
color sensor in a program written for an EV3?
• When the sensor only needs to tell light from dark.
• When the colors to be told apart give reliably & consistently
different readings.
• Stop on a line, follow a line, and avoid a line are no problem.
Following only green lines will be hard, maybe impossible.
• Note: To learn how to use the NXT Light sensor to line follow,
see the Line Following lesson on EV3Lesson.com
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM
(5/2017)
Notes for teachers/coaches
10
It’d be nice if the sound sensor block looked like the light sensor and
were labeled as a light sensor, but the kids in my class adjusted to this
quirk pretty easily. It was certainly easier to explain to novices than
using raw values would have been. Installing the sound sensor block
before class time will save on headaches.
Some other options, for those who would like to pursue them:
 The “NXT light sensors in EV3 tutorial” at EV3lessons.com
 Calibrating a light sensor (still uses the sound block)
http://drpineda.ca/using-nxt-light-sensor-in-ev3.html
 https://www.youtube.com/watch?v=I7Bqvk-
uMLk&feature=youtu.be
©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
End of the lesson
11

More Related Content

Similar to Ao light nxt2 - Beginner

Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videosAdria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Codiax
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
ssuser90e017
 
Gr 12 - Buzzer Project on Sound Production (W10).pptx
Gr 12 - Buzzer Project on Sound Production (W10).pptxGr 12 - Buzzer Project on Sound Production (W10).pptx
Gr 12 - Buzzer Project on Sound Production (W10).pptx
afsheenfaiq2
 

Similar to Ao light nxt2 - Beginner (19)

05-transformers.pdf
05-transformers.pdf05-transformers.pdf
05-transformers.pdf
 
The Torque and Angulation Lab with IN-Tendo
The Torque and Angulation Lab with IN-TendoThe Torque and Angulation Lab with IN-Tendo
The Torque and Angulation Lab with IN-Tendo
 
Screencasting and Presenting for Engineers
Screencasting and Presenting for EngineersScreencasting and Presenting for Engineers
Screencasting and Presenting for Engineers
 
OBS Studio.pptx
OBS Studio.pptxOBS Studio.pptx
OBS Studio.pptx
 
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videosAdria Recasens, DeepMind – Multi-modal self-supervised learning from videos
Adria Recasens, DeepMind – Multi-modal self-supervised learning from videos
 
Automated Speech Recognition
Automated Speech Recognition Automated Speech Recognition
Automated Speech Recognition
 
Beginning nxt programming_workshop in Computer education robotics whoevgjvvvv...
Beginning nxt programming_workshop in Computer education robotics whoevgjvvvv...Beginning nxt programming_workshop in Computer education robotics whoevgjvvvv...
Beginning nxt programming_workshop in Computer education robotics whoevgjvvvv...
 
Lingual and Labial Orthodontic Indirct Bonding Services
Lingual and Labial Orthodontic Indirct Bonding ServicesLingual and Labial Orthodontic Indirct Bonding Services
Lingual and Labial Orthodontic Indirct Bonding Services
 
16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx16 OpenCV Functions to Start your Computer Vision journey.docx
16 OpenCV Functions to Start your Computer Vision journey.docx
 
Gr 12 - Buzzer Project on Sound Production (W10).pptx
Gr 12 - Buzzer Project on Sound Production (W10).pptxGr 12 - Buzzer Project on Sound Production (W10).pptx
Gr 12 - Buzzer Project on Sound Production (W10).pptx
 
Road signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencvRoad signs detection using voila jone's algorithm with the help of opencv
Road signs detection using voila jone's algorithm with the help of opencv
 
UNIT-4.pdf
UNIT-4.pdfUNIT-4.pdf
UNIT-4.pdf
 
UNIT-4.pdf
UNIT-4.pdfUNIT-4.pdf
UNIT-4.pdf
 
Edge detection iOS application
Edge detection iOS applicationEdge detection iOS application
Edge detection iOS application
 
Kinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipeiKinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipei
 
UNIT-4.pptx
UNIT-4.pptxUNIT-4.pptx
UNIT-4.pptx
 
FMP Problem Solving
FMP Problem SolvingFMP Problem Solving
FMP Problem Solving
 
False colouring
False colouringFalse colouring
False colouring
 
Final Project
Final ProjectFinal Project
Final Project
 

More from Romaric Saounde Tsopnang

More from Romaric Saounde Tsopnang (20)

Aq switches2 - Beginner
Aq   switches2 - BeginnerAq   switches2 - Beginner
Aq switches2 - Beginner
 
Aq les conditionnelles - Débutant
Aq   les conditionnelles - DébutantAq   les conditionnelles - Débutant
Aq les conditionnelles - Débutant
 
Ap les boucles - Débutants
Ap   les boucles - DébutantsAp   les boucles - Débutants
Ap les boucles - Débutants
 
Ap loops2 - Beginner
Ap   loops2 - BeginnerAp   loops2 - Beginner
Ap loops2 - Beginner
 
An capteur de couleur - Débutant
An   capteur de couleur - DébutantAn   capteur de couleur - Débutant
An capteur de couleur - Débutant
 
An color Sensor - Beginner
An   color Sensor - BeginnerAn   color Sensor - Beginner
An color Sensor - Beginner
 
Al capteur tactile - Débutant
Al   capteur tactile - DébutantAl   capteur tactile - Débutant
Al capteur tactile - Débutant
 
Al touch2 - Beginner
Al   touch2 - BeginnerAl   touch2 - Beginner
Al touch2 - Beginner
 
Ak custom imagessounds2 - Beginner
Ak   custom imagessounds2 - BeginnerAk   custom imagessounds2 - Beginner
Ak custom imagessounds2 - Beginner
 
Ak image et son standard - Débutant
Ak   image et son standard - DébutantAk   image et son standard - Débutant
Ak image et son standard - Débutant
 
Aj display2 - Beginner
Aj   display2 - BeginnerAj   display2 - Beginner
Aj display2 - Beginner
 
Aj affichage - Débutant
Aj   affichage - DébutantAj   affichage - Débutant
Aj affichage - Débutant
 
Ai turning2 - Beginner
Ai   turning2 - BeginnerAi   turning2 - Beginner
Ai turning2 - Beginner
 
Ai virages - Débutant
Ai   virages - DébutantAi   virages - Débutant
Ai virages - Débutant
 
Ah pseudocode2 - Beginner
Ah   pseudocode2 - BeginnerAh   pseudocode2 - Beginner
Ah pseudocode2 - Beginner
 
Ah pseudocode-fr - Débutant
Ah   pseudocode-fr - DébutantAh   pseudocode-fr - Débutant
Ah pseudocode-fr - Débutant
 
Ag moving straight2 - Beginner
Ag   moving straight2 - BeginnerAg   moving straight2 - Beginner
Ag moving straight2 - Beginner
 
Ag deplacement droit - Débutant
Ag   deplacement droit - DébutantAg   deplacement droit - Débutant
Ag deplacement droit - Débutant
 
Af port view2 - Beginner
Af   port view2 - BeginnerAf   port view2 - Beginner
Af port view2 - Beginner
 
Af vue des portes - Débutant
Af   vue des portes - DébutantAf   vue des portes - Débutant
Af vue des portes - Débutant
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 

Ao light nxt2 - Beginner

  • 1. NXT LIGHT SENSOR WITH NXT PROGRAMMED IN EV3-G LEÇON DE PROGRAMMATION POUR DÉBUTANT
  • 2. LESSON OBJECTIVEs • Learn how to use the NXT Light sensor with an NXT brick using EV3-G programming 2©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
  • 3. Using a light sensor with NXT in EV3-g • How can we make a light sensor work with the EV3 software and NXT brick? • Pretend it is a sound sensor (Beginner) • Use the Raw Sensor Block (Advanced) • This lesson will cover the beginner level 3 ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
  • 4. Downloading the Sound Block • The Sound Sensor Block is available for download on the LEGO.com site: • http://www.lego.com/en- us/mindstorms/downloads • Download the block using the “Importing Additional Blocks Lesson” in Beginner in EV3Lessons.com • Note: If you are using the EDU software, the block will already be in your palette ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017) 4
  • 5. Using the light sensor with the sound sensor block 5 • Once you install the sound sensor block, you can select the sound sensor for any loop, switch, or wait block. • The “sound” sensor has two settings: • In dB mode, it shines a red light and measures how much light is reflected. (Reflected light mode) A red light comes from the sensor whenever it is working in dB mode. White surfaces give a high (~70) reading. Black surfaces give a low (~20) reading. • In dBa mode, it looks for ambient light. (Ambient Light Mode) The red light will not be on. • Don’t worry about using a sound sensor in your program when you really have a light sensor connected. Everything works just fine. ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
  • 6. Example Usage: Reading the Light Sensor & Displaying ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017) 6 Reflected Light mode Ambient Light mode
  • 7. COLOR SENSOR CHALLENGE Now that you know how to use the NXT Light sensor, can you use it to make the robot move up to a black line using the color sensor? Step 1: Use Wait For NXT Sound Sensor (NXT Light) Step 2: Use the NXT Sound Sensor in Compare dB mode Step 3: To know what value to use, you will have to use Port View to determine what the NXT Light sensor reads for Black (refer to the ”Port View” Lesson in Beginner in EV3Lessons.com. Note that for the NXT, this is called “View  Light”) Hint: You will use Move Steering (think about motor on and off) and Wait for “Color” © EV3LESSONS.COM, 2016, (LAST EDIT: 7/04/2016) 7
  • 8. Color Sensor Challenge Solution FINISH START Move Steering Set to “OFF” with BRAKE Move Steering Set to “ON” Wait until Color is Black (threshold <40 determined using View) 8
  • 9. Using your NXT light sensor with other EV3 programs 9 • When can we substitute a “sound” (really light) sensor for a color sensor in a program written for an EV3? • When the sensor only needs to tell light from dark. • When the colors to be told apart give reliably & consistently different readings. • Stop on a line, follow a line, and avoid a line are no problem. Following only green lines will be hard, maybe impossible. • Note: To learn how to use the NXT Light sensor to line follow, see the Line Following lesson on EV3Lesson.com ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
  • 10. Notes for teachers/coaches 10 It’d be nice if the sound sensor block looked like the light sensor and were labeled as a light sensor, but the kids in my class adjusted to this quirk pretty easily. It was certainly easier to explain to novices than using raw values would have been. Installing the sound sensor block before class time will save on headaches. Some other options, for those who would like to pursue them:  The “NXT light sensors in EV3 tutorial” at EV3lessons.com  Calibrating a light sensor (still uses the sound block) http://drpineda.ca/using-nxt-light-sensor-in-ev3.html  https://www.youtube.com/watch?v=I7Bqvk- uMLk&feature=youtu.be ©2017 CATHY SARISKY. SHARED WITH PERMISSION BY EV3LESSONS.COM (5/2017)
  • 11. End of the lesson 11