lunes, 20 de mayo de 2019

Reto Timbre

Utilizando la programación del semáforo, cree un timbre. (al presionar el botón suena, al soltar el botón deja de sonar)




#include <Adafruit_CircuitPlayground.h>
//incio del Programa
void setup() {
  Serial.begin(9600);
  CircuitPlayground.begin();
}

//ciclo del Programa
void loop() {

      if (CircuitPlayground.leftButton()== 1) {

        CircuitPlayground.playTone( 262, 1000 );

      }
   }


No hay comentarios:

Publicar un comentario