dis145

clase-03

materiales

  1. Arduino
  2. Cable usb arduino
  3. Protoboard
  4. Resistencias
  5. cables
  6. Botones
void setup() {
int x=0;
}

//Estoy intentando crear el codigo tengo todos los materiales pero tengo un problema de puerto usb para pasar el codigo arduino

//2024
// primer arduino
// por GermanGallardo
// hecho por Arduino Ide 1.8.18
const int botonPin = 2;
int estadoBoton;
int estadoAnterior = LOW;

void setup() {
  pinMode(botonPin, INPUT);
  Serial.begin(9600);

void loop() {

  estadoBoton = digitalRead(botonPin);


  if (estadoBoton == HIGH && estadoAnterior == LOW) {

    Serial.println("Click");
  }


  estadoAnterior = estadoBoton;
}