I’m using 2 MeLight Sensors on a mBot to use it as a line following robot that can also sense more than just black and white if only using the MeLineFollower.
The issue is that the return range of the MeLight Sensor keeps changing.
Turn the mBot on and the light readings are between 0 to 1024 (it sees white as 900+ so I’m assuming the 1024 upper limit.
I’ll then turn the mBot off and on again and the readings are now between 0 and 254.
The code has not changed and I cannot work out why the range changes from one session to another,
Frustrating if teaching kids how to use the mBot.
MeLightSensor range keeps changing
Hi Tards57,
Have you connected the two MeLight Sensors to Port 3, Port 4 on mCore board?
What is your testing program? Please upgrade firmware for mBot first before you testing the Light sensor.
If your testing program is keep reading the value from light sensor (like below), you can cover the whole me light sensor with your hand, then you can see the value will be in a small range and won’t change to much. If you move the hand and fix it in one place, the value won’t change in a large range either unless the light intensity arround keep changing.
Hi Tech Support
The values of the light sensor are changing using a test program as you have shown.
My issue is that the range changes.
I can be using the test code and the range is between zero and 255.
Off and the on and it will show values from zero to 1024.
That’s the issue. How am I to write programs with kids if the range keeps changing. I will need to test each time I turn on the mBot and then set threshold values to suit the range the Light Senor has changed to.
I also have another questioner you light sensors.
I want to sue them for advanced Line Following where coloured intersections indicate a direction to turn. This is why the LineFollower sensor is useless.
You original Light Sensors had a IR light and these worked well. You removed this with V2 but I need it back. The IR light flooded the area and gave me reflected light readings not ambient as the current version does and it is horrible to sue as a line following sensor. BTW, I use 2 or three for line following. I have even shielded the MeLight Sensor so that it can only read what is below it.
Are your team willing to work on a modified Light sensor that will work as an advanced line follower.
BTW, I have the Light Sensor Array and it does not read light ranges just black and white, I need more.