Welcome to Open Discussion

Knefel
2012-03-01
2013-04-29
  • Knefel

    Knefel - 2012-03-01

    Welcome to Open Discussion

     
  • Alexander Kolotov

    Hi,

    What is the algorithm to calculate value for the light sensor? Does it just mesure some particular point under sensor or it operates with several ones?

     
  • Knefel

    Knefel - 2012-03-26

    Hi alex-kolotov ,

    the light value is calculated as the mean value ​​of neighboring points.

     
  • Alexander Kolotov

    Frank,

    How many of such points are used? 5 (cross) or 9 (3x3 points)?
    The reason I am asking is that I tried to implement P regulator to be run on nxcSimulator. But it does not behave as I desire. Someting closely similar to P-regulator-behavior I achieved when added my own background - gradient from black to white.

     
  • Knefel

    Knefel - 2012-03-26

    I have just looked at the source code. I wonder about myself, it should actually be calculated 3x3 points, but I have removed this feature. The calculation is performed at the time only by one point. Here all three RGB values ​​are added and then an average value is calculated. The maximum possible mean value 255 corresponds to 100 percent of the light sensor.

     
  • Knefel

    Knefel - 2012-03-28

    I've just implemented a menu for the next version that lets you choose between 1, 3x3, 5x5, 7x7 and 9x9 pixels for the resolution of the light sensor.

     
  • Alexander Kolotov

    Thanks Frank! It should be very useful!

    How worth it would be to add any debug ability, at least simulator of NXT screen? It will be great to see information that see sensors in run time.

     
  • Knefel

    Knefel - 2012-03-28

    A  very simple "NXT screen" is on the left side of the simulator (look at the nxcSimulator menu -> Help). Try for example: NumOut (0, LCD_LINE1, SENSOR_1); … it will only work with "LCD_LINE…" not with numbers!

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks