Arduino AVR mega 2560 operator AND problem

Rikki
2013-02-11
2013-05-30
  • Rikki
    Rikki
    2013-02-11

    If this example is compiled it does not work on the AVR mega 2560 (as used on Arduino)

    Would it be possible to fix this bug?

    Thanks.

    IF (sensor=1) AND (light=0) then buzzer = 1
    

    However, this code does provide a workaround:

    IF sensor = 1 then
        
               IF light = 0 set buzzer = 1
    end if