índice de actividades.
1) temperatura
2) relay with gsm
3) smart irrigation system
4) blink with recycled led
5) ldr and motor
6) tweet and relay
7) solar tracker
float temperatura;
int pinTemp=0;
void setup() {
Serial.begin(115200);
}
void loop() {
temperatura=analogRead(pinTemp);
temperatura=temperatura*0.48828125; //500 grados es 5v a 10mV por 1°C
Serial.println(temperatura);
delay(1000);
}
once that We Have the temperature from device, we are going to go Matlab plataform
int pinTemp=0
int pinTemp=0;
clc;
clear all;
comport = serial('COM5', 'BaudRate', 115200); % setup comport
fopen(comport); % Open comport
x=0;
while(x<500)
x=x+1;
y1(x)=fscanf(comport, '%d'); % receive ADC1
%y2....
drawnow;
plot(y1,'r-','linewidth',1)
grid on;
hold on;
title('temperature sequence');
xlabel('Time');
ylabel('Temperature');
pause(30);
end
fclose(comport); % Close comport
delete(comport); % Clear comport