Answers.Body: <p>My FLL team wrote a light sensor myblock that converts the raw value to a number between 0 and 100. They run it on the EV3 so they can use their existing NXT light sensors. It should work on the NXT brick as well. Here is the video they posted to explain how it works. </p>
  
  <p><a href="http://youtu.be/I7Bqvk-uMLk" rel="nofollow">http://youtu.be/I7Bqvk-uMLk</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-10-22T01:48:40.430Z
Answers.Text: Nice video.  What are the typical raw sensor readings that you get?
Answers.UserDisplayName: dfrevert
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-10-22T12:14:02.613Z
Answers.Text: We usually see around 2200 for black and 1300 for white.
Answers.UserDisplayName: Lego Works
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-10-22T14:07:39.423Z
Answers.Text: I just tested our light sensors on the NXT and get raw value readings of around 590 for black and 350 for white. Our light sensor myblocks work the same on the NXT as they do on the EV3 and convert the values to numbers between 0 and 100. We found that adding a Round block set to nearest at the end of the light sensor myblock equation helps when using this on the NXT. It didn't like the decimal numbers for some reason. Hope this helps.
Answers.UserDisplayName: Lego Works
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-10-21T12:45:05.110Z
Answers.LastActivityDate: 2013-10-21T12:45:05.110Z
Answers.UserDisplayName: Lego Works
Answers.Body: <p>You can consider this the "official" answer based on the EV3 firmware source code.</p>
  
  <p><a href="https://github.com/mindboards/ev3sources-xtended/blob/master/ev3sources/lms2012/lms2012/Linux_AM1808/sys/settings/typedata.rcf" rel="nofollow">This file</a> is used for scaling the values that you see in "Port View" on the EV3 brick itself.</p>
  
  <p>The NXT Light Sensor is defined in these two lines: </p>
  
  <pre><code>2 0 NXT-REFLECT 1 1 3 0 2 119 0x32 3372.0 445.0 0 100 0.0 100.0 20 0 pct
  2 1 NXT-AMBIENT 1 1 3 0 2 119 0x30 3411.0 633.0 0 100 0.0 100.0 20 0 pct
  </code></pre>
  
  <p>This means that in NXT-REFLECT mode (LED is on), a raw value of 445 = 0% and a raw value of 3372 = 100%. In NXT-AMBIENT mode (LED is off), a raw value of 633 = 0% and a raw value of 3411 = 100%.</p>
  
  <p>To change to NXT-AMBIENT mode, you might be able to use the NXT Sound Sensor block. Select the port that is connected to the light sensor and set the mode to "dBa".</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-21T17:25:14.550Z
Answers.LastActivityDate: 2014-07-21T17:25:14.550Z
Answers.UserDisplayName: David Lechner
Answers.Body: <p>Is it because the software is running on an NXT brick?</p>
  
  <p>YES, The raw value range of light and sound sensor is 0~1024 on NXT.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-10-25T09:09:52.373Z
Answers.LastActivityDate: 2013-10-25T09:09:52.373Z
Answers.UserDisplayName: user3045
Body: <p>EV3 software does not support the Light Sensor. It does support the Color Sensor.</p>
  
  <p>The solution is to use the Raw Sensor Block.</p>
  
  <p>What is "normal" for raw sensor block readings?</p>
  
  <p>I'm getting readings between 450 and 700, with brighter readings at the lower end of the range.  I expected brighter to be the larger number.  Is there an expected range of values?</p>
  
  <p>Is it because the software is running on an NXT brick?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-10-17T15:13:57.787Z
Comments.Text: This question is a bit confusing - you're using which programming software and putting this on which brick? NXT or EV3?
Comments.UserDisplayName: Timtech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-10-17T23:39:28.187Z
Comments.Text: EV3 software on my laptop. NXT hardware (brick). The only way to use the NXT Light sensor is with a Raw Sensor block.
Comments.UserDisplayName: dfrevert
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-10-17T23:50:03.307Z
Comments.Text: Page 29 of [link](http://www.firstlegoleague.org/sites/default/files/Challenge/TeamResources/NaturesFury/2013EV3Programming.pdf) says 1300 to 2300 and that brighter is less than darker.
Comments.UserDisplayName: dfrevert
Tags: <mindstorms><nxt><ev3><programming>
Title: What is a normal range of reading of the Light Sensor using EV3 Raw Sensor block?
UserDisplayName: dfrevert
ThreadText: # What is a normal range of reading of the Light Sensor using EV3 Raw Sensor block?
  
  (Asked by: username_0 on 2013-10-17)
  
  EV3 software does not support the Light Sensor. It does support the Color Sensor.
  
  The solution is to use the Raw Sensor Block.
  
  What is "normal" for raw sensor block readings?
  
  I'm getting readings between 450 and 700, with brighter readings at the lower end of the range. I expected brighter to be the larger number. Is there an expected range of values?
  
  Is it because the software is running on an NXT brick?
  
  **Tags:** mindstorms, nxt, ev3, programming
  
  > **Comments:**
  > **username_1**: This question is a bit confusing - you're using which programming software and putting this on which brick? NXT or EV3?  
  > **username_0**: EV3 software on my laptop. NXT hardware (brick). The only way to use the NXT Light sensor is with a Raw Sensor block.  
  > **username_0**: Page 29 of [link](http://www.firstlegoleague.org/sites/default/files/Challenge/TeamResources/NaturesFury/2013EV3Programming.pdf) says 1300 to 2300 and that brighter is less than darker.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2013-10-21. Score: 3 | Accepted answer
  
  My FLL team wrote a light sensor myblock that converts the raw value to a number between 0 and 100. They run it on the EV3 so they can use their existing NXT light sensors. It should work on the NXT brick as well. Here is the video they posted to explain how it username_2.
  
  <http://youtu.be/I7Bqvk-uMLk>
  
  > **Comments:**
  > **username_0**: Nice video.  What are the typical raw sensor readings that you get?  
  > **username_2**: We usually see around 2200 for black and 1300 for white.  
  > **username_2**: I just tested our light sensors on the NXT and get raw value readings of around 590 for black and 350 for white. Our light sensor myblocks work the same on the NXT as they do on the EV3 and convert the values to numbers between 0 and 100. We found that adding a Round block set to nearest at the end of the light sensor myblock equation helps when using this on the NXT. It didn't like the decimal numbers for some reason. Hope this helps.  
  
  ---
  
  ### Answer by username_3 on 2014-07-21. Score: 2
  
  You can consider this the "official" answer based on the EV3 firmware source code.
  
  [This file](https://github.com/mindboards/ev3sources-xtended/blob/master/ev3sources/lms2012/lms2012/Linux_AM1808/sys/settings/typedata.rcf) is used for scaling the values that you see in "Port View" on the EV3 brick itself.
  
  The NXT Light Sensor is defined in these two lines:
  
  ```
  2 0 NXT-REFLECT 1 1 3 0 2 119 0x32 3372.0 445.0 0 100 0.0 100.0 20 0 pct
  2 1 NXT-AMBIENT 1 1 3 0 2 119 0x30 3411.0 633.0 0 100 0.0 100.0 20 0 pct
  
  ```
  
  This means that in NXT-REFLECT mode (LED is on), a raw value of 445 = 0% and a raw value of 3372 = 100%. In NXT-AMBIENT mode (LED is off), a raw value of 633 = 0% and a raw value of 3411 = 100%.
  
  To change to NXT-AMBIENT mode, you might be able to use the NXT Sound Sensor block. Select the port that is connected to the light sensor and set the mode to "dBa".
  
  
  ---
  
  ### Answer by username_4 on 2013-10-25. Score: 0
  
  Is it because the software is running on an NXT brick?
  
  YES, The raw value range of light and sound sensor is 0~1024 on NXT.
  
  
  ---
  
  