TABLE OF CONTENTS


1.2.1. Whenever Select Color senses Red do

Code inside this block will be executed whenever the selected color is sensed by color sensor.

Example 1.2.1:

Before execution:



After execution:



1.2.2.Whenever Select color senses color change

Code inside this block will be executed whenever the color sensor changes in color in front of it.

Example 1.2.2:


Before execution:


After execution:


1.2.3.Whenever Select Color senses Brightness

Code inside this block will be executed whenever proximity sensor senses brightness around it.

Example 1.2.3:


Before execution:



After execution:



 1.2.4.Whenever Select Color senses Darkness

Code inside this block will be executed whenever proximity sensor senses brightness around it.

Example 1.2.4:


Before execution:


After execution:





1.2.5.Set light value greater than entered percentage of Select Color as bright

Set the threshold of light value around proximity in percentage above which surroundings will be considered bright.


Example 1.2.5:


Before execution:



After execution:



 1.2.6.Set light value > entered value lux of Select Color as bright

 Set the threshold of light value around proximity in lux above which surroundings will be considered bright.

Example 1.2.6:


Before execution:


After execution:


1.2.7.Get color in front of  Select Color

Get the color that is currently in front of color sensor.

Example 1.2.7:


Before execution:



After execution:

1.2.8.Get light around Select Color in percentage

Get the light around proximity sensor in percentage.Bright sunny surroundings give 100% whereas pitch dark surroundings results in 0%.

Example 1.2.8:


Before execution:



After execution:





1.2.9.Get light around Select Color in lux

Get the light around the proximity sensor in lux.

Example 1.2.9:


Before execution:


After execution:



1.2.10.Get Red component of light around Select Color in lux



Light as we see contains Red,Green and Blue light components in it.This block gets you the intensity of the selected component.


Example 1.2.10:


Before execution:


After execution:




1.2.11.Wait for Select Color to sense Red

Wait for the color sensor to detect the selected color.

Example 1.2.11:


Before execution:




After execution:



1.2.12. Wait for Select Color to sense a color change

Wait for the color sensor to detect a color change.


Example 1.2.12:


Before execution:



After execution:

Whenever execution starts the display will be displayed on the simdisplay as shown below. As the color sensor sense any color change the displayed in simdisplay will be cleared.



1.2.13.Wait for Select Color to change from Dark to Bright

Wait for the change of light around the proximity sensor before moving to the next block.   

Example 1.2.13:

Before execution: As execution starts it will display the image.


After execution: