Color sensor bugs :-(

HomeForumsMonoBrick EV3 FirmwareColor sensor bugs :-(

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4453
    Author Image
    Orlando_2k
    Participant

    Hi, I want to report some strange bugs. Maybe you can fix some of them in the next release.
    First: the color sensor seems to work only on port 1 for me.
    Second: I’ve got a loop that reads values from a NXT us sensor on port 2, an other NXT us sensor on port 3 and the color sensor. Then after a short time the color sensor led goes off and starts blinking red.
    I get only the value 0 from the color sensor after that. The other sensors still work fine.
    My code:

    class MainClass
    {

    //Ports
    static Motor mLeft;
    static Motor mRight;
    static UltraSonicSensor sLeft;
    static UltraSonicSensor sRight;
    static EV3ColorSensor sColor;

    static void init ()
    {
    mLeft = new Motor (MotorPort.OutA);
    mRight = new Motor (MotorPort.OutC);
    sLeft = new UltraSonicSensor(SensorPort.In2,UltraSonicMode.Centimeter);
    sRight = new UltraSonicSensor(SensorPort.In3,UltraSonicMode.Centimeter);
    sColor = new EV3ColorSensor(SensorPort.In1);
    }

    public static void Main (string[] args)
    {
    init ();

    while(true){
    if(sLeft.ReadDistance() < 20) LcdConsole.WriteLine(“Left”);
    if(sRight.ReadDistance() < 20) LcdConsole.WriteLine(“Right”);
    if(sColor.Read() > 0) LcdConsole.WriteLine(“Object detected”); //well this line is not required for the bug to happen
    }
    }

    }

    • This topic was modified 9 years, 10 months ago by Author ImageOrlando_2k.
    #4465
    Author Image
    Anders Søborg
    Keymaster

    Hi Olando

    These bugs have already been fixed with this commit and will be part of the next release.

    Anders

    #4473
    Author Image
    Orlando_2k
    Participant

    oh, ok
    I’m Sorry for having wasted your time!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Posted in

Make a donation