active buzzer problem after call to lcd.begin() on esp8266
Posted: Sat Aug 27, 2016 1:21 pm
We have a rather successful setup with an ESPDuino + RFID + relay + I2c display + active buzzer, the only odd thing is that we cannot get the buzzer going again after the setup call for lcd.begin()
See code below : during setup the buzzer beeps loudly for 500 msec, but as soon as the lcd.begin() call is made any digitalWrite call to get the buzzer going ends up in a very soft chirp. Furthermore when counting in a loop and updating the lcd the buzzer chirps softly while the GPIO5 (buzzer) is not addressed at all
The buzzer vcc is hooked up to 3.3 volts. the board is an ESPduino by DOIT
See code below : during setup the buzzer beeps loudly for 500 msec, but as soon as the lcd.begin() call is made any digitalWrite call to get the buzzer going ends up in a very soft chirp. Furthermore when counting in a loop and updating the lcd the buzzer chirps softly while the GPIO5 (buzzer) is not addressed at all
The buzzer vcc is hooked up to 3.3 volts. the board is an ESPduino by DOIT
Code: Select all
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
pinMode(BUZZER, OUTPUT);
pinMode(RELAY, OUTPUT);
digitalWrite(RELAY, LOW);
// USE_SERIAL.begin(115200);
digitalWrite(BUZZER, HIGH); delay(500);digitalWrite(BUZZER, LOW);
WiFiMulti.addAP("xxxxxxxxxxxxx", "xxxxxxxxxxxxxx");
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card
digitalWrite(RELAY, HIGH);delay(300);digitalWrite(RELAY, LOW);
lcd.begin();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Laser 'VERA' ");
}