How to program a light sensor in robotc pro#The Light Sensor needs to be paired with a programming language such as the VEXcode V5 or VEXcode Pro V5 to create a user program for the Brain to use the value from the percent of brightness to control the robot’s behavior. A certain threshold of higher percent brightness needs to be used above the background light so a difference can be detected beyond the normal fluctuation of analog values returned from the background light.Ī dim light may be able to be detected in a dark room, but a dim light will go undetected in a well lit room. In other words if the light shining on the sensor is too close to the intensity of the background light, the Light Sensor will not be able to detect a difference. The voltage returned to the V5 Brain will be converted into a percent brightness of the light.ĭue to the analog nature of the sensor, a threshold of light brightness needs to be established for a returned value. This means the sensor will take a 5v source from the V5 Brain and the photoresistor will change this value to a value between 5v and 0v depending on the light exposure. This photoresistor changes its resistance value depending on the amount of incident light shining on the sensor. The HiTechnic Color sensor is now ready for use.The Light Sensor functions due to a photoresistor mounted in the center of its housing. If the sensor is not found on port 1 or is not the correct version of the sensor, the following error message will be displayed. It will take only take about 1 second for the program to run. The configuration program will make sure the HiTechnic Color Sensor is connected to port 1 of the NXT and will display the following if the programĬompletes the configuration correctly. (use the arrow keys to display the program name if it is not displayed) Press to select the configuration program. Use the Enter (orange) button to load and run the program. How to program a light sensor in robotc download#Navigate to the location where you downloaded the configuration program file and click OK to download it to the NXT.Ĭonnect your new HiTechnic color sensor to port 1 and use the NXT buttons to run the configuration program. How to program a light sensor in robotc software#Run the MINDSTORMS software and select “Create new program”.Ĭlick the Memory tab to display the NXT memory map.Ĭlick Download to download the configuration file to the NXT. To load the program into your NXT, connect the NXT to your PC. Using the Electric Frequency Table HERE, determine your local electric frequency and then click on the appropriate configuration program name to download the appropriate program for your location.Ĭonfiguration using EV3 is not available at this time. To overcome the interference, the color sensor should be configured for your local electric frequency. The light produced by electric lights “flickers” at the frequency of the electric supply and this flickering can interfere with the HiTechnic color sensor. MINDSTORMS and the color sensor are often used in environments that are illuminated with electric lights. Such locations include Canada, USA, and South Korea. The HiTechnic Color Sensor is configured by default for locations with 60Hz electrical supplies so if you live in a country with a 60Hz electrical supply no configuration is necessary. These are 50Hz (50 cycles per second) and 60Hz (60 cycles per second). There are two electric supply frequencies commonly used throughout the world. The updated version of the HiTechnic Color sensor (sold from July 2009) must be configured to match the mains electricity frequency for your country. Configuration HiTechnic Color Sensor Configuration
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |