quarta-feira, 15 de março de 2017

Micro sistema JARVIS com arduino

/*

This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/AnalogInput

No int sensorPin = A8 e onde de conecta o micro phone para se comunicar com o
jarvis, neste caso para teste só para ligar o led.

 */

int sensorPin = A8;    // select the input pin for the potentiometer
int ledPin = 26;      // select the pin for the LED
int sensorValue = 0;  // variable to store the value coming from the sensor

void setup() {
  // declare the ledPin as an OUTPUT:
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  // turn the ledPin on
  digitalWrite(ledPin, HIGH);
  // stop the program for milliseconds:
  delay(sensorValue);
  // turn the ledPin off:
  digitalWrite(ledPin, LOW);
  // stop the program for for milliseconds:
  delay(sensorValue);
}

0 comments:

Postar um comentário


Caso queria ajudar nosso projeto... Fique à vontade !!!


EBOOKS

Translate | Tradutor

Deseja anunciar aqui. Fale comigo !!!

Nome

E-mail *

Mensagem *

Tecnologia do Blogger.

Popular Posts

Arquivo