Check the brake pedal switch. A few people here have taken it apart for cleaning; you might find some additional info searching this forum. Or you could just replace it. I don't think it's terribly expensive and might be a good troubleshooting first step.