Projeto 1: Módulo LED Piranha
int led = 3;
void setup()
{
pinMode(led, OUTPUT); //Set Pin3 as output
}
void loop()
{ digitalWrite(led, HIGH); //Turn off led
delay(2000);
digitalWrite(led, LOW); //Turn on led
delay(2000);
}
Projeto 2: Módulo LED branco digital
int led = 3;
void setup()
{
pinMode(led, OUTPUT); //Set Pin3 as output
}
void loop()
{
digitalWrite(led, HIGH); //Turn on led
delay(2000);
digitalWrite(led, LOW); //Turn off led
delay(2000);
}
Projeto 3: Módulo Buzzer passivo
int buzzer=8;//set digital IO pin of the buzzer
void setup()
{
pinMode(buzzer,OUTPUT);// set digital IO pin pattern, OUTPUT to be output
}
void loop()
{ unsigned char i,j;//define variable
while(1)
{ for(i=0;i<80;i++)// output a frequency sound
{ digitalWrite(buzzer,HIGH);// sound
delay(1);//delay1ms
digitalWrite(buzzer,LOW);//not sound
delay(1);//ms delay
}
for(i=0;i<100;i++)// output a frequency sound
{
digitalWrite(buzzer,HIGH);// sound
digitalWrite(buzzer,LOW);//not sound
delay(2);//2ms delay
} } }
Projeto 4: Sensor magnético Hall
int ledPin = 13; // choose the pin for the LED
int inputPin = 3; // Connect sensor to input pin 3
int val = 0; // variable for reading the pin status
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input
}
void loop(){
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, LOW); // turn LED OFF
} else {
digitalWrite(ledPin, HIGH); // turn LED ON
}
}
Projeto 5: Sensor de temperatura LM35
void setup()
{
Serial.begin(9600);//Set Baud Rate to 9600 bps
}
void loop()
{
int val;
int dat;
val=analogRead(0);//Connect LM35 on Analog 0
dat=(500 * val) /1024;;
Serial.print("Temp:"); //Display the temperature on Serial monitor
Serial.print(dat);
Serial.println("C");
delay(500);
}
Projeto 6: Sensor de temperatura 18B20
#include
int DS18S20_Pin = 2; //DS18S20 Signal pin on digital 2
//Temperature chip i/o
OneWire ds(DS18S20_Pin); // on digital pin 2
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
float temperature = getTemp();
Serial.println(temperature);
delay(100); //just here to slow down the output so it is easier to read
}
float getTemp(){
//returns the temperature from one DS18S20 in DEG Celsius
byte data[12];
byte addr[8];
if ( !ds.search(addr)) {
//no more sensors on chain, reset search
ds.reset_search();
return -1000;
}
if ( OneWire::crc8( addr, 7) != addr[7]) {
Serial.println("CRC is not valid!");
return -1000;
}
if ( addr[0] != 0x10 && addr[0] != 0x28) {
Serial.print("Device is not recognized");
return -1000;
}
ds.reset();
ds.select(addr);
ds.write(0x44,1); // start conversion, with parasite power on at the end
byte present = ds.reset();
ds.select(addr);
ds.write(0xBE); // Read Scratchpad
for (int i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();
}
ds.reset_search();
byte MSB = data[1];
byte LSB = data[0];
float tempRead = ((MSB << 8) | LSB); //using two's compliment
float TemperatureSum = tempRead / 16;
return TemperatureSum;
}
Projeto 7: Sensor de inclinação digital
int ledPin = 13; // Connect LED to pin 13
int switcher = 3; // Connect Tilt sensor to Pin3
void setup()
{
pinMode(ledPin, OUTPUT); // Set digital pin 13 to output mode
pinMode(switcher, INPUT); // Set digital pin 3 to input mode
}
void loop()
{
if(digitalRead(switcher)==HIGH) //Read sensor value
{
digitalWrite(ledPin, HIGH); // Turn on LED when the sensor is tilted
}
else
{
digitalWrite(ledPin, LOW); // Turn off LED when the sensor is not triggered
}
}
Projeto 8: Sensor de fotocélula
int sensorPin =A0 ;
int value = 0;
void setup()
{
Serial.begin(9600); }
void loop()
{
value = analogRead(sensorPin);
Serial.println(value, DEC);
delay(50); }
Projeto 9: Botão digital
/* # When you push the digital button, the Led 13 on the board will turn on. Otherwise,the led turns off.
*/
int ledPin = 13; // choose the pin for the LED
int inputPin = 3; // Connect sensor to input pin 3
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input
}
void loop(){
int val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, LOW); // turn LED OFF
} else {
digitalWrite(ledPin, HIGH); // turn LED ON
}
}
Projeto 10: Sensor touch
int ledPin = 13; // Connect LED on pin 13, or use the onboard one
int KEY = 2; // Connect Touch sensor on Digital Pin 2
void setup(){
pinMode(ledPin, OUTPUT); // Set ledPin to output mode
pinMode(KEY, INPUT); //Set touch sensor pin to input mode
}
void loop(){
if(digitalRead(KEY)==HIGH) { //Read Touch sensor signal
digitalWrite(ledPin, HIGH); // if Touch sensor is HIGH, then turn on
}
else{
digitalWrite(ledPin, LOW); // if Touch sensor is LOW, then turn off the led
}
}
Projeto 11: Sensor de temperatura e humidade DHT11
#include
dht11 DHT;
#define DHT11_PIN 4
void setup(){
Serial.begin(9600);
Serial.println("DHT TEST PROGRAM ");
Serial.print("LIBRARY VERSION: ");
Serial.println(DHT11LIB_VERSION);
Serial.println();
Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)");
}
void loop(){
int chk;
Serial.print("DHT11, \t");
chk = DHT.read(DHT11_PIN); // READ DATA
switch (chk){
case DHTLIB_OK:
Serial.print("OK,\t");
break;
case DHTLIB_ERROR_CHECKSUM:
Serial.print("Checksum error,\t");
break;
case DHTLIB_ERROR_TIMEOUT:
Serial.print("Time out error,\t");
break;
default:
Serial.print("Unknown error,\t");
break;
}
// DISPLAT DATA
Serial.print(DHT.humidity,1);
Serial.print(",\t");
Serial.println(DHT.temperature,1);
delay(1000);
}
Projeto 12: Sensor de som analógico
void setup()
{
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0); //connect mic sensor to Analog 0
Serial.println(val,DEC);//print the sound value to serial
delay(100);
}
Projeto 13: Sensor de chama
const int flamePin = 2; // the number of the flame pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int State = 0; // variable for reading status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(flamePin, INPUT);
}
void loop(){
// read the state of the value:
State = digitalRead(flamePin);
if (State == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Projeto 14: Sensor relógio DS3231
#include
#include "DS3231.h"
DS3231 RTC; //Create the DS3231 object
char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
//year, month, date, hour, min, sec and week-day(starts from 0 and goes to 6)
//writing any non-existent time-data may interfere with normal operation of the RTC.
//Take care of week-day also.
DateTime dt(2011, 11, 10, 15, 18, 0, 5);//open the series port and you can check time here or make a change to the time as needed.
void setup ()
{ Serial.begin(57600);//set baud rate to 57600
Wire.begin();
RTC.begin();
RTC.adjust(dt); //Adjust date-time as defined 'dt' above
}
void loop ()
{
DateTime now = RTC.now(); //get the current date-time
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.date(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
Serial.print(weekDay[now.dayOfWeek()]);
Serial.println();
delay(1000);
}
Projeto 15: Sensor de gás analógico MQ-2
///Arduino Sample Code
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0);//Read Gas value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
Projeto 16: Sensor de álcool analógico MQ-3
///Arduino Sample Code
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0);//Read Gas value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
Projeto 17: Sensor de nível de água
int analogPin = 0; //connect water sensor to analog interface 0
int led = 13; //LED to digital interface 13
int val = 0; //define the initial value of variable ‘val’ as 0
int data = 0; //define the initial value of variable ‘data’ as 0
void setup()
{
pinMode(led, OUTPUT); //define led as output pin
Serial.begin(9600); //set baud rate at 9600
}
void loop()
{
val = analogRead(analogPin); //read and assign analog value to variable ’val’
if(val>700){ //decide whether variable ‘val’ is over 700 digitalWrite(led,HIGH); //turn on LED when variable ‘val’ is over 700
}
else{
digitalWrite(led,LOW); //turn off LED when variable ‘val’ is under 700
}
data = val; //variable ’val’ assigns value to variable ‘data’
Serial.println(data); //print variable ‘data’ by Serial.print
delay(100);
}
Projeto 18: Sensor de humidade do solo
/*
# Example code for the moisture sensor
# Connect the sensor to the A0(Analog 0) pin on the Arduino board
# the sensor value description
# 0 ~300 dry soil
# 300~700 humid soil
# 700~950 in water
*/
void setup(){
Serial.begin(57600);
}
void loop(){
Serial.print("Moisture Sensor Value:");
Serial.println(analogRead(0));
delay(100);
Projeto 19: Sensor de contorno de obstáculos infravermelho
const int flamePin = 2; // the number of the flame pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int State = 0; // variable for reading status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(flamePin, INPUT);
}
void loop(){
// read the state of the value:
State = digitalRead(flamePin);
if (State == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Projeto 20: Sensor de movimento PIR
byte sensorPin = 3;
byte indicator = 13;
void setup()
{
pinMode(sensorPin,INPUT);
pinMode(indicator,OUTPUT);
Serial.begin(9600);
}
void loop()
{
byte state = digitalRead(sensorPin);
digitalWrite(indicator,state);
if(state == 1)Serial.println("Somebody is in this area!");
else if(state == 0)Serial.println("No one!");
delay(500);
}
Projeto 21: Módulo Joystick
int JoyStick_X = 0; //x
int JoyStick_Y = 1; //y
int JoyStick_Z = 3; //key
void setup()
{
pinMode(JoyStick_Z, INPUT);
Serial.begin(9600); // 9600 bps
}
void loop()
{
int x,y,z;
x=analogRead(JoyStick_X);
y=analogRead(JoyStick_Y);
z=digitalRead(JoyStick_Z);
Serial.print(x ,DEC);
Serial.print(",");
Serial.print(y ,DEC);
Serial.print(",");
Serial.println(z ,DEC);
delay(100);
}
Projeto 22: Módulo interruptor de foto
// photo interrupter module
int Led = 13 ;// define LED Interface
int buttonpin = 3; // define the photo interrupter sensor interface
int val ;// define numeric variables val
void setup ()
{
pinMode (Led, OUTPUT) ;// define LED as output interface
pinMode (buttonpin, INPUT) ;// define the photo interrupter sensor output interface
}
void loop ()
{
val = digitalRead (buttonpin) ;// digital interface will be assigned a value of 3 to read val
if (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}
Projeto 23: Módulo Relé 5V
int Relay = 8;
void setup()
{
pinMode(13, OUTPUT); //Set Pin13 as output
digitalWrite(13, HIGH); //Set Pin13 High
pinMode(Relay, OUTPUT); //Set Pin3 as output
}
void loop()
{
digitalWrite(Relay, HIGH); //Turn off relay
delay(2000);
digitalWrite(Relay, LOW); //Turn on relay
delay(2000);
}
Projeto 24: Módulo de Aceleração de três eixos ADXL345
/*
The circuit:
VCC: 5V
GND: ground
SCL: UNO SLC
SDA: UNO SDA
This example code is in the public domain.
*/
#include
// Registers for ADXL345
#define ADXL345_ADDRESS (0xA6 >> 1) // address for device is 8 bit but shift to the
// right by 1 bit to make it 7 bit because the
// wire library only takes in 7 bit addresses
#define ADXL345_REGISTER_XLSB (0x32)
int accelerometer_data[3];
// void because this only tells the cip to send data to its output register
// writes data to the slave's buffer
void i2c_write(int address, byte reg, byte data) {
// Send output register address
Wire.beginTransmission(address);
// Connect to device
Wire.write(reg);
// Send data
Wire.write(data); //low byte
Wire.endTransmission();
}
// void because using pointers
// microcontroller reads data from the sensor's input register
void i2c_read(int address, byte reg, int count, byte* data) {
// Used to read the number of data received
int i = 0;
// Send input register address
Wire.beginTransmission(address);
// Connect to device
Wire.write(reg);
Wire.endTransmission();
// Connect to device
Wire.beginTransmission(address);
// Request data from slave
// Count stands for number of bytes to request
Wire.requestFrom(address, count);
while(Wire.available()) // slave may send less than requested
{
char c = Wire.read(); // receive a byte as character
data[i] = c;
i++;
}
Wire.endTransmission();
}
void init_adxl345() {
byte data = 0;
i2c_write(ADXL345_ADDRESS, 0x31, 0x0B); // 13-bit mode +_ 16g
i2c_write(ADXL345_ADDRESS, 0x2D, 0x08); // Power register
i2c_write(ADXL345_ADDRESS, 0x1E, 0x00); // x
i2c_write(ADXL345_ADDRESS, 0x1F, 0x00); // Y
i2c_write(ADXL345_ADDRESS, 0x20, 0x05); // Z
// Check to see if it worked!
i2c_read(ADXL345_ADDRESS, 0X00, 1, &data);
if(data==0xE5)
Serial.println("it work Success");
else
Serial.println("it work Fail");
}
void read_adxl345() {
byte bytes[6];
memset(bytes,0,6);
// Read 6 bytes from the ADXL345
i2c_read(ADXL345_ADDRESS, ADXL345_REGISTER_XLSB, 6, bytes);
// Unpack data
for (int i=0;i<3;++i) {
accelerometer_data[i] = (int)bytes[2*i] + (((int)bytes[2*i + 1]) << 8);
}
}
// initialise and start everything
void setup() {
Wire.begin();
Serial.begin(9600);
for(int i=0; i<3; ++i) {
accelerometer_data[i] = 0;
}
init_adxl345();
}
void loop() {
read_adxl345();
Serial.print("ACCEL: ");
Serial.print(float(accelerometer_data[0])*3.9/1000);//3.9mg/LSB scale factor in 13-bit mode
Serial.print("\t");
Serial.print(float(accelerometer_data[1])*3.9/1000);
Serial.print("\t");
Serial.print(float(accelerometer_data[2])*3.9/1000);
Serial.print("\n");
delay(100);
}
Projeto 25: Módulo botão rotativo (rotary encoder)
const int interruptA = 0;
const int interruptB = 1;
int CLK = 2; // PIN2
int DAT = 3; // PIN3
int BUTTON = 4; // PIN4
int LED1 = 5; // PIN5
int LED2 = 6; // PIN6
int COUNT = 0;
void setup()
{
attachInterrupt(interruptA, RoteStateChanged, FALLING);
// attachInterrupt(interruptB, buttonState, FALLING);
pinMode(CLK, INPUT);
digitalWrite(2, HIGH); // Pull High Restance
pinMode(DAT, INPUT);
digitalWrite(3, HIGH); // Pull High Restance
pinMode(BUTTON, INPUT);
digitalWrite(4, HIGH); // Pull High Restance
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
Serial.begin(9600);
}
void loop()
{
if (!(digitalRead(BUTTON)))
{
COUNT = 0;
Serial.println("STOP COUNT = 0");
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
delay (2000);
}
Serial.println(COUNT);
}
//-------------------------------------------
void RoteStateChanged() //When CLK FALLING READ DAT
{
if (digitalRead(DAT)) // When DAT = HIGH IS FORWARD
{
COUNT++;
digitalWrite(LED1, HIGH);
digitalWrite(LED2, LOW);
delay(20);
}
else // When DAT = LOW IS BackRote
{
COUNT--;
digitalWrite(LED2, HIGH);
digitalWrite(LED1, LOW);
delay(20);
}
}
Projeto 26: Sensor de rotação analógico
///Arduino Sample Code
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0);//Read rotation sensor value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
Projeto 27: Sensor ultrassónico HC-SR04
#define echoPin 7 // Echo Pin
#define trigPin 8 // Trigger Pin
#define LEDPin 13 // Onboard LED
int maximumRange = 200; // Maximum range needed
int minimumRange = 0; // Minimum range needed
long duration, distance; // Duration used to calculate distance
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(LEDPin, OUTPUT); // Use LED indicator (if required)
}
void loop() {
/* The following trigPin/echoPin cycle is used to determine the
distance of the nearest object by bouncing soundwaves off of it. */
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
//Calculate the distance (in cm) based on the speed of sound.
distance = duration/58.2;
if (distance >= maximumRange || distance <= minimumRange){
/* Send a negative number to computer and Turn LED ON
to indicate "out of range" */
Serial.println("-1");
digitalWrite(LEDPin, HIGH);
}
else {
/* Send the distance to the computer using Serial protocol, and
turn LED OFF to indicate successful reading. */
Serial.println(distance);
digitalWrite(LEDPin, LOW);
}
//Delay 50ms before next reading.
delay(50);
}
Projeto 28: Monitor de frequência de pulso cardíaco
int ledPin = 13;
int sensorPin = 0;
double alpha = 0.75;
int period = 20;
double change = 0.0;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
}
void loop()
{
static double oldValue = 0;
static double oldChange = 0;
int rawValue =
analogRead(sensorPin);
double value = alpha * oldValue
+ (1 - alpha) * rawValue;
Serial.print(rawValue);
Serial.print(",");
Serial.println(value);
oldValue = value;
delay(period);
}
Projeto 29: Módulo Reed Switch
int Led=13;//define LED interface
int buttonpin=3; //define magnetic ring sensor interface
int val;//define digital variable val
void setup()
{
pinMode(Led,OUTPUT);//define LED as output interface
pinMode(buttonpin,INPUT);//define magnetic ring sensor as output interface
}
void loop()
{
val=digitalRead(buttonpin);// read and assign the value of digital interface 3 to val
if(val==HIGH)//When a signal is detected by magnetic ring sensor, LED will flash
{
digitalWrite(Led,HIGH);
}
else
{
digitalWrite(Led,LOW);
}
}
Projeto 30: Sensor luz ambiente TEMT6000
int temt6000Pin = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
int value = analogRead(temt6000Pin);
Serial.println(value);
delay(100); //only here to slow down the output so it is easier to read
}
Projetos
Projeto 1: Módulo LED Piranha
Este é um Módulo LED muito especial visto que, depois de ser programado (pode consultar o código no separador Programação), emite uma luz especialmente brilhante e bonita. Pode ser combinado com outros sensores, para realizar experiências interativas muito interessantes.
Características:
Tipo de módulo: digital
Tensão de funcionamento: 5V
Distância entre pinos: 2.54 mm
Tamanho: 30x20mm
Peso: 3g
Diagrama de conexão:
Projeto 2: Módulo LED digital branco
Este LED digital tem um cor branca brilhante e é ideal para aqueles que se estão a iniciar no Arduino. Pode ser facilmente conectado a uma entrada/saída da placa ou ao Sensor Shield V5. Pode consultar o código no separador Programação.
Características:
Tipo de módulo: Digital
Socket PH2.54
Luz branca
Permite a interação entre exercícios relacionados com luz
Tamanho 30×20 mm
Peso: 3g
Diagrama de conexão:
Projeto 3: Módulo Buzzer passivo
Depois de dois exercícios com LEDs, este projeto permite realizar uma experiência de som. O Módulo Buzzer Passivo funciona através de frequências pulsares externas e produz sons diferentes a diferentes frequências. Poderá utilizar o código (pode consultar no separador Programação) no Arduino para codificar a melodia de uma música com este módulo.
Características:
Tensão de funcionamento: 3.3 – 5V
Tipo de interface: digital
Tamanho: 30 x 20mm
Peso: 4g
Diagrama de Conexão:
Projeto 4: Sensor Magnético
Este é um Sensor de indução magnética que deteta os materiais magnéticos dentro de um alcance até 3 cm. Neste projeto, poderá pôr a prova esta capacidade do módulo, colocando objetos magnéticos perto do sensor. Pode consultar o código no separador Programação.
Características:
Deteta materiais magnéticos
Alcance: até 3 cm
Saída: digital on/off
A força do campo magnético e a o alcance de detação são proporcionais.
Tamanho: 30 x 20 mm
Peso: 3g
Diagrama de conexão:
Projeto 5: Sensor de temperatura LM35
Com este Sensor de temperatura LM35, pode medir a temperatura do meio ambiente, num intervalo de temperaturas que vais dos 0 aos 100 graus Celcius. Pode consultar o código no separador Programação.
Características:
Baseia-se no semiconductor LM35
Pode se utilizado para detetar a temperature ambiente
Sensibilidade: 10 mV por grau Celsiu
Alcance de funcionamento: 0 graus Celsius a 100 graus Celsius
Tamanho: 30 x 20 mm
Peso: 3g
Diagrama de conexão:
Projeto 6: Sensor de temperatura 18B20
Neste projeto, também utilizará um Sensor de Temperatura, mas desta vez o 18B20. Trata-se deum sensor digital, capaz de medir a temperatura num intervalo que vai dos -55 aos +125 graus Celsius. Pode consultar o código no separador Programação.
Características:
Tensão de funcionamento: 3.3V a 5V
Alcance: -55 °C ~ +125 °C
Interface: Digital
Tamanho: 30*20mm
Peso: 3g
Diagrama de conexão
Projeto 7: Sensor de inclinação digital
Este sensor de inclinação digital é capaz de identificar a inclinação. Depois de o conectar à Placa controladora Arduino UNO R3 e de introduzir o código no seu Arduino (pode consultar no separador Programação), verá que a luz do sensor e a luz da placa vão ligando e desligando consoante a inclinação
Características:
Tensão de funcionamento: 3.3V a 5V
Interface: Digital
Tamanho: 30 x 20 mm
Peso: 3g
Diagrama de conexão:
Projeto 8: Sensor fotoresistência
Este Sensor fotoresistência contém um resistor cuja resistência varia consoante a incidência de luz. É muito utilizado em situações que exijam um switch de controlo automático, como em câmaras, luzes solares de jardins, detetores de dinheiro, relógios quartz, luzes noturnas mini e controlo de luz e de som. Este projeto permite-lhe medir a intensidade da luz, consoante as alterações no meio. Pode consultar o código para este projeto no separador Programação.
Características:
Tipo de interface: analógica
Tensão de funcionamento: 5V
Tamanho: 30 x 20mm
Peso: 3g
Diagrama de conexão:
Projeto 9: Módulo Push Button digital
Este módulo tem uma aplicação muito simples e básica. Conecte-o à placa controladora como mostra o Diagrama de Conexão e copie o código para a plataforma Arduino do seu computador (pode consultá-lo no separador Programação). Poderá logo ver que ao pressionar o botão a luz LED do pino 13 vai ligar e ao largar vai desligar.
Características:
Tensão de funcionamento: 3.3V a 5V
Fácil de utilizar
Estrutura padrão
Reconhece facilmente as interfaces dos sensores
Concector de alta qualidade
Interface: digital
Tamanho: 30 x 20 mm
Peso: 4g
Diagrama de conexão:
Projeto 10: Sensor touch
Este Sensor touch é capaz de sentir o toque humano e de metal e transmitir essa informação para o Arduino. Com este projeto, pode experimentar uma aplicação muito simples do sensor. Depois de conectá-lo à placa controladora, como mostra o diagrama de conexão, copie o código para o seu Arduino (pode consultá-lo no separador Programação). Verá que, ao tocar no módulo, o LED do módulo e o LED da placa vão ligar.
Características:
Tensão de funcionamento: 3.3V a 5V
Interface: Digital
Tamanho: 30 x 20 mm
Peso: 3g
Diagrama de conexão:
Projeto 11: Sensor de temperatura e humidade DHT11
Neste projeto, vai poder medir a temperatura e a humidade com o mesmo sensor. Depois de conectá-lo à placa controladora, como mostra o diagrama de conexão, copie o código para o seu Arduino (pode consultá-lo no separador Programação). No computador, vão aparecer os valores de temperatura e humidade do meio onde se encontra o sensor. Poderá testar as variações alterando as condições do meio.
Características:
Tensão de funcionamento: +5 V
Alcance de temperatura: 0-50 °C erro de ± 2 °C
Alcance de humidade: 20-90% RH ± 5% RH erro
Interface: Digital
Tamanho: 30 x 20 mm
Peso: 4g
Diagrama de conexão:
Projeto 12: Sensor de som analógico
O Sensor de som analógico é habitualmente utilizado para detetar a sonoridade do meio ambiente. Poderá testá-lo facilmente, num projeto simples, ligando-o à placa controladora como mostra o diagrama de conexão e inserindo o código que se encontra no separador Programação. No computador, aparecerão valores que correspondem ao ruído que existe no meio que rodeia o sensor.
Características:
Tensão de funcionamento: 3.3V a 5V
Deteta a intensidade do som
Interface: Analógica
Tamanho: 30*20mm
Peso: 4g
Diagrama de conexão:
Projeto 13: Sensor de chama
Com este sensor, é possível detetar chama de fogo, numa faixa de largura espectral de 760 nm a 1100 nm. Poderá testá-lo num exercício muito básico, ligando-o à placa controladora como mostra o diagrama de conexão e inserindo o código que se encontra no separador Programação. Ao acender um isqueiro próximo do sensor, verá que o LED irá ligar e desligar quando deixar de sentir chama num campo próximo
Características:
Tensão de funcionamento: 3.3V a 5V
Alcance: 20 cm (4.8V) ~ 100 cm (1V)
Faixa de largura espectral de banda: 760 nm a 1100 nm
Temperatura de funcionamento: -25℃ a 85℃
Interface: digital
Tamaho: 44 x 16.7 mm
Peso: 4g
Diagrama de conexão:
Projeto 14: Sensor relógio DS3231
Este Sensor relógio DS3231 é útil para projetos que necessitem de conhecer dados de localização temporal (hora, data). Poderá testá-lo num exercício muito básico, ligando-o à placa controladora como mostra o diagrama de conexão. Antes de inserir o código, que se encontra no separador Programação, certifique-se que a biblioteca DS3231 se encontra dentro do catálogo Arduino. Depois carregue o código, abra uma janela serial monitor e vai encontrar os resultados dos dados que estão pré-programados no código.
Características:
Faixa de temperatura: -40 to +85;
Precisão: ± 5 ppm (±0.432 segundos/dia)
Dispõe de uma bateria de segurança para que a cronometragem continue
Baixo consumo de energia
O design e o funcionamento são compatíveis com DS3231
Possui uma função de calendário de relógio completa, com segundos, minutos, horas, semanas, dias, meses e anos e inclui também a informação dos anos bissextos até 2100.
Dois relógios calendário
Saída: 1Hz and 32.768kHz
Saída Reset e Entra Debounce of Pushbutton
Velocidade alta (400kHz), I2C serial bus
Tensão de alimentação: +3.3V a +5.5V
Sensor de temperatura digital com uma precisão de ±3℃
Temperatura de funcionamento: -40 ~ C to +85 ~ C
Encapsulamento de circuitos integrados de 16 pinos (300mil)
Certificado pela American Association of Underwriters Laboratories (UL)
Tamanho: 30 x 20 mm
Peso: 4g
Diagrama de conexão:
Projeto 15: Sensor de gás analógico MQ-2
Este sensor de gás analógico MQ2 é muitas vezes utilizado em equipamentos de deteção de fugas de gás na área eletrónica e industrial. É próprio para detetar GPL, isobutano, propano, metano, álcool, hidrogénio e fumo. Poderá testá-lo num exercício muito básico. Ligue-o à placa controladora como mostra o diagrama de conexão e insira o código que se encontra no separador Programação no seu Arduino. Ao acender um isqueiro próximo do sensor, verá o LED irá ligar, por sentir o gás inflamável. Se abrir uma janela serial motor, poderá também ver os valores.
Características:
Tensão de funcionamento: 5V
Tipo de interface: Analog
Alcance de deteção amplo
Resposta rápida e sensibilidade alta
Circuito drive simples
Grande durabilidade e estabilidade
Tamanho: 49.7 x 20 mm
Peso: 8g
Diagrama de conexão: