3 Leds Con Potenciometros Arduino.docx

  • Uploaded by: Sebastian Cetina
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 3 Leds Con Potenciometros Arduino.docx as PDF for free.

More details

  • Words: 52
  • Pages: 2
int verde=6; int rojo=5; int amarillo=3; const int pot1=0; const int pot2=1; const int pot3=2; int green; int red; int yellow;

void setup() { pinMode(verde, OUTPUT); pinMode(rojo, OUTPUT); pinMode(amarillo, OUTPUT); Serial.begin(9600); }

void loop() { green= analogRead(pot1)*(255.0/1023.0); analogWrite(verde,green); Serial.print(green); Serial.print(" ");

red= analogRead(pot2)*(255.0/1023.0); analogWrite(rojo,red); Serial.print(red); Serial.print(" ");

yellow= analogRead(pot3)*(255.0/1023.0); analogWrite(amarillo,yellow); Serial.println(yellow);

}

Related Documents

Potenciometros
April 2020 4
Voltimetro Con Leds
May 2020 4
Leds
June 2020 19
Leds
November 2019 20
Leds
June 2020 12

More Documents from ""

Informe De Entrega.docx
November 2019 14
December 2019 15
Estudio Legal Ojo.docx
November 2019 5
Lab Ciclo Otto.docx
November 2019 7
Informe Segurallantas.docx
November 2019 4