Construyase su propio espejo inteligente


Ha sido famoso la noticia  de un ingeniero de software de Google(Max Braun,)  que ha construido su propio espejo  casero  inteligente para su cuarto de baño ,mientras está esperando que llegue algo similar en  el mercado ,de modo que decidió hacerlo el mismo  en su tiempo libre registrando  todos los detalles de construcción sobre la plataforma Medium.com.
Es posible que haya visto un espejo inteligente casero antes, pero el diseño de Braun ha resultado ser un elegante espejo  con  Android con un acabado final que nos  recuerda directamente a la ciencia ficción. Se utiliza un espejo de dos vías, un panel de visualización, una tarjeta controladora, además de un montón de componentes y suministros de arte y manualidades. Usando una combinación de Android y las API de pronóstico del tiempo, así como una alimentación por  RSS , creó este panel de información de vidrio,siendo sólo un milímetro de espesor  y colocando la pantalla en una capa entre el cristal del espejo de dos vías y la puerta del gabinete de la medicina.

 

mirror

El panel de la pantalla es bastante impresionante. Se puede ver la fecha y la hora a la derecha donde su cara sería. A la izquierda, se puede ver el tiempo actual y un pronóstico de 24 horas con algunos titulares de las noticias recientes de abajo. En su mayor parte, los iconos y el texto son en blanco y negro para evitar ser  sea demasiado distraído.
Otros conceptos que esta barajando son el tráfico , recordatorios y básicamente cualquier cosa que tenga una tarjeta de Google Now pues la idea es que no sea necesario para interactuar con esta interfaz de usuario:en su lugar, se actualiza automáticamente y hay una interfaz de búsqueda por voz abierto para cualquier cosa que se nos ocurra.

espejonew

A pesar de su apariencia Impresionante, Braun todavía lo llama  prototipo. Si nos fijamos en el interior del espejo,esta construido en base a un Amazon Fire TV Stick corriendo Android APK ,el cual gobierna el UI(Interfaz de Usuario).
Precisamente en este punto es donde encontramos más problemas, ya que no es lo mismo la información condensada en un smartphone o incluso una tablet, que información dividida y bien presentada  para poder leerse desde lejos: ahí es donde la FireTV y su interfaz para televisores encaja a la perfección

Además de eso dispone de cables para conectar los dispositivos, LED para mostrar avisos y un HDMI para la imagen. Los resultados son muy llamativos pues podemos ver todos los datos, el tiempo, las notificaciones… e incluso interactuar desde la distancia con nuestro móvil ya que podemos enviar información a la Fire TV.
El autor escribió la Interfaz de Usuario mediante unos pocos cientos de líneas de código y ademas  esta experimentando con diferentes dispositivos como Chromecast, reproductor Nexus, y recientemente Amazon TV Stick.

El espejo puede incluso escuchar sus preguntas con la función de búsqueda por voz en la Aplicación Móvil de Google.

Este es un proyecto increíble y esperamos ver más de estos  ya industrializados  en el próximo CES, pero mientras  haya productos  similares  en el mercado  se puede obtener un resultado muy  parecido al espejo de Braun  con los siguientes componentes:

  • Un smartphone o por dimensiones mejor una tableta Android  que ya no usemos ( por ejemplo porque se le haya roto el digitalizador)
  • Un espejo de dos direcciones
  • Papel negro,bolígrafo, tijeras, pegamento,adhesivos de doblecara, clavos,etc

 

HannahMitt en su proyecto de Github, y   EvanCohen     han obtenido resultados parecidos que resumimos ahora: ambos se basan en el  uso de  la aplicación de Mirror Home que deberemos instalar  en nuestro dispositivo Android.

Tras instalarla ,deberemos ajustar el brillo al máximo para que se vea claramente, eliminar el ahorro de energía  y  desinstalar  el resto de aplicaciones pues lo ideal es  mantener el dispositivo lo más ligero posible para consumir el mínimo.
pantala1
Esta app  le puede decir las  noticias, comprueba su estado de ánimo, y le muestra los cómics: todas esta información esta disponible mientras  usted comprueba su cabello o se afeita.Esta aplicación es inusual pues como hemos dicho esta pensada  para usarla  detrás de un espejo de acrílico de dos vías.

La información que muestra esta app :

  • Día, hora y pantalla de tiempo
  • Recomendaciones Ciclismo
  • Oscilaciones bursátiles
  • Mensajes edificantes sobre la base de sonrisas cara
  • XKCD de hoy
  • Siguiente evento del calendario
  • Top titular de la noticia

Atención ,muchas de las funciones están escritos para mostrar sólo hasta cuando son más relevantes.Si encuentra errores puede reportarlos  aqui ( el repositorio Github del proyecto)

pantala2  pantal3

Instalada esta app, debemos medir la tableta y en el papel negro recortamos para cubrir todo el tamaño del espejo excepto donde vaya el móvil o la tablet.  Enganche  ahora  el papel negro con el espejo, ajústelo y deje un tiempo para que se seque.

Coloque con pegamento un trozo de papel tres veces más gordo que la tableta en cada una de las esquinas del espejo. Ahora  puede colocar los adhesivos en la parte superior e inferior y presione para que quede compacto.

Introduzca la tableta Android justo en el hueco que queda y conéctelo para que no se apague rápidamente(con más cinta adhesiva podemos ocultar los cables.

Ya puede fijarlo a la  pared, vigilando no dañar el propio espejo.

Si tiene dudas en el siguiente vídeo podemos ver todo el proceso:

Por cierto para terminar , esta idea no es sólo válida  para el espejo del baño, también podría servir para los espejos de los ascensores, los espejos de los retrovisores ,etc ,

 

Fuente aqui

Enviando información de sensores a la nube


La telemedicina es el uso de las tecnologías de las telecomunicaciones y de la información con el fin de proporcionar atención clínica de la salud a distancia. Favorece la eliminación de las barreras de distancia y puede mejorar el acceso a los servicios médicos que no suelen estar siempre disponibles en lejanas comunidades rurales. También se utiliza para salvar vidas en cuidados críticos y situaciones de emergencia.

Aunque hubo precursores distantes de la telemedicina, que es esencialmente un producto de telecomunicaciones del siglo 20 y las tecnologías de la información. Estas tecnologías permiten la comunicación entre paciente y el personal médico con conveniencia y fidelidad, así como la transmisión de los médicos, la imagen y la salud informática de datos de un sitio a otro.

Sensores de la  plataforma eHealth permite compartir datos médicos con la nube, y realizar diagnóstico en tiempo real. Gracias a los módulos de comunicación puede enviar muchos datos a través de varios protocolos de transmisión

 

Wifi

Vamos a utilizar el módulo wifi Roving RN-171. Este módulo encaja en el zócalo XBee Shield de nuestra comunicación y permite conectar tu Arduino / escudo RasberryPi a una red WiFi.
Example code
Wifi examples shows the way to communicate with the Arduino Wifi Demo Android and iPhone app.
Refer to Wifi tutorials (Arduino) (Raspberry) for more information.

Bluetooth

Módulos Bluetooth para Arduino / Netduino/Raspberry son capaces de estar conectados a la XBee Shield y obtener una comunicación serie entre el ordenador y una placa Arduino / RasberryPi a través de protocolo Bluetooth.
Módulo Bluetooth para Arduino PRO soporta Serial Port Profile (SPP) para intercambiar datos con otros dispositivos. Este perfil permite crear conexiones a otro dispositivo usando el mismo perfil (p2p conexión). Se envía datos al dispositivo especificado. Este dispositivo es el que ha sido creado para la conexión.
 
Consulte tutoriales Bluetooth (Arduino) (Frambuesa) para obtener más información.

 

Zigbee / 802.15.4

El Arduino Xbee shield permite su Arduino / RasberryPi bordo para comunicarse de forma inalámbrica utilizando Zigbee.
Example code
This example shows the way to communicate with the Arduino using Zigbee protocol. Upload the next code:

Show Code

/*
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *
 *  Description: "The e-Health Sensor Shield allows Arduino and Raspberry Pi 
 *  users to perform biometric and medical applications by using 9 different 
 *  sensors: Pulse and Oxygen in Blood Sensor (SPO2), Airflow Sensor (Breathing),
 *  Body Temperature, Electrocardiogram Sensor (ECG), Glucometer, Galvanic Skin
 *  Response Sensor (GSR - Sweating), Blood Pressure (Sphygmomanometer) and 
 *  Patient Position (Accelerometer)."  
 *
 *  Explanation: This example shows the way to communicate with  
 *  the Arduino using ZigBee protocol. 
 *
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 *
 *  Version 0.1
 *  Author: Luis Martin & Ahmad Saad 
 */

#include
#include

char recv[128];
uint8_t cont = 0;

// Note : The Xbee modules must be configured previously.
// See the next link http://www.cooking-hacks.com/index.php/documentation/tutorials/arduino-xbee-shield

void setup()
{
Serial.begin(9600);

eHealth.initPulsioximeter();
eHealth.initPositionSensor();

//Attach the inttruptions for using the pulsioximeter.
PCintPort::attachInterrupt(6, readPulsioximeter, RISING);
delay(1000);

}

void loop()
{

//1. Read from eHealth.
int airFlow = eHealth.getAirFlow();
float temperature = eHealth.getTemperature();
float conductance = eHealth.getSkinConductance();
float resistance = eHealth.getSkinResistance();
int BPM = eHealth.getBPM();
int SPO2 = eHealth.getOxygenSaturation();
uint8_t pos = eHealth.getBodyPosition();

Serial.print(int(airFlow)); Serial.print(«#»);
Serial.print(temperature); Serial.print(«#»);
Serial.print(int(BPM)); Serial.print(«#»);
Serial.print(int(SPO2)); Serial.print(«#»);
Serial.print(conductance); Serial.print(«#»);
Serial.print(int(resistance)); Serial.print(«#»);
Serial.print(int(pos)); Serial.print(«#»);
Serial.print(«\n»);

// Reduce this delay for more data rate
delay(250);
}

void check(){
cont=0; delay(500);
while (Serial.available()>0)
{
recv[cont]=Serial.read(); delay(10);
cont++;
}
recv[cont]=’\0′;
Serial.println(recv);
Serial.flush(); delay(100);
}

//Include always this code when using the pulsioximeter sensor
//=========================================================================
void readPulsioximeter(){

cont ++;

if (cont == 50) { //Get only one 50 measures to reduce the latency
eHealth.readPulsioximeter();
cont = 0;
}
}

NOTE: The Xbee modules must be configured previously. See the next link http://www.cooking-hacks.com/index.php/documentation/tutorials/arduino-xbee-shield
Refer to XBee tutorials (Arduino) (Raspberry) for more information.

GPRS

Cuatribanda GPRS para Arduino/Netduino Módulo /Raspberry (SIM900) ofrece conexión GPRS a la placa Arduino / cartón RasberryPi. Usted puede enviar sus datos a través de SMS o de llamadas perdidas no de tu Arduino/netduino a los dispositivos móviles … oa otro Arduino / netduino/RasberryPi conectado a este módulo.
Example code
This example shows the way to send a text message with the corporal temperature using the GPRS module. Upload the next code:

Show Code

/*
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *
 *  Description: "The e-Health Sensor Shield allows Arduino and Raspberry Pi 
 *  users to perform biometric and medical applications by using 9 different 
 *  sensors: Pulse and Oxygen in Blood Sensor (SPO2), Airflow Sensor (Breathing),
 *  Body Temperature, Electrocardiogram Sensor (ECG), Glucometer, Galvanic Skin
 *  Response Sensor (GSR - Sweating), Blood Pressure (Sphygmomanometer) and 
 *  Patient Position (Accelerometer)."  
 *
 *  Explanation: This example shows the way to send a text message with 
 *  the corporal temperature using the GPRS module. 
 *
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 *
 *  Version 0.1
 *  Author: Luis Martin & Ahmad Saad 
 */

// For more information about the GPRS shield please see our tutorial
// in cooking-hacks web site. http://www.cooking-hacks.com

#include

// the pin to switch on the module (without press on button)
int pinModuleOn = 2;

// ********* is the number to call
char phoneNumber[]=»**********»;

void switchModule(){
digitalWrite(pinModuleOn,HIGH);
delay(2000);
digitalWrite(pinModuleOn,LOW);
}

void setup() {

// UART baud rate
Serial.begin(115200);
delay(2000);

// Sitches the module ON
// switchModulo();

for (int i=0;i < 5;i++){
Serial.println(«Push the button»);
delay(5000);
}
// Sets the SMS mode to text
Serial.println(«AT+CMGF=1»);
delay(100);
}

void loop(){

delay(100);
float temperature = eHealth.getTemperature();

delay(1500);
// send the SMS number
Serial.print(«AT+CMGS=\»»);
Serial.print(phoneNumber);
Serial.println(«\»»);
// the SMS body
while(Serial.read()!=’>’);
Serial.print(temperature);

delay(1000);
//sends ++
Serial.write(0x1A);
Serial.write(0x0D);
Serial.write(0x0A);
delay(5000);

}

Refer to GPRS tutorials (Arduino) (Raspberry) for more information.

3G

El nuevo escudo 3G para Arduino / Netduino/Rasberry permite la conectividad a alta velocidad WCDMA y HSPA celulares con el fin de hacer posible la creación de un nivel superior de interactividad proyectos en todo el mundo dentro de la nueva «Internet de las Cosas» era..
Example code
This example how to send data using 3G shield and making a connection to a server. Upload the next code:

Show Code

/*
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *
 *  Description: "The e-Health Sensor Shield allows Arduino and Raspberry Pi 
 *  users to perform biometric and medical applications by using 9 different 
 *  sensors: Pulse and Oxygen in Blood Sensor (SPO2), Airflow Sensor (Breathing),
 *  Body Temperature, Electrocardiogram Sensor (ECG), Glucometer, Galvanic Skin
 *  Response Sensor (GSR - Sweating), Blood Pressure (Sphygmomanometer) and 
 *  Patient Position (Accelerometer)."  
 *
 *  Explanation: This example how to send data using 3G shield and 
 *  making a connection to a server. 
 *
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 *
 *  Version 0.1
 *  Author: Luis Martin & Ahmad Saad 
 */

// For more information about the 3G shield please see our tutorial
// in cooking-hacks web site. http://www.cooking-hacks.com

#include

char data[512];
char tosend[128];
int led = 13;
int onModulePin = 2; // the pin to switch on the module (without press on button)

int x = 0;

char name[20];

char server[ ]=»192.198.1.1″; //Your server IP address
char port[ ]=»5555″; // Your port.

void switchModule(){
digitalWrite(onModulePin,HIGH);
delay(2000);
digitalWrite(onModulePin,LOW);
}

void setup(){

Serial.begin(115200); // UART baud rate
delay(2000);
pinMode(led, OUTPUT);
pinMode(onModulePin, OUTPUT);
switchModule(); // switches the module ON

for (int i=0;i< 5;i++){
delay(5000);
}

Serial.println(«AT+CGSOCKCONT=1,\»IP\»,\»internetmas\»»);
Serial.flush();
x=0;
do
{
while(Serial.available()==0);
data[x]=Serial.read();
x++;
} while(!(data[x-1]==’K’&&data[x-2]==’O’)); //waits for response «Network opened»

}

void loop()
{
float temperature = eHealth.getTemperature();
int longitud = sprintf(tosend,»%d», temperature);

Serial.print(«AT+NETOPEN=\»TCP\»,»);
//Opens the socket with the type of protocol and the port
Serial.println(port);
Serial.flush();
x=0;

do
{
while(Serial.available()==0);
data[x]=Serial.read();
x++;
}
while(!(data[x-1]==’K’&&data[x-2]==’O’)); //waits for response «Network opened»

Serial.print(«AT+TCPCONNECT=\»»); //Connects with the server
Serial.print(server);
Serial.print(«\»,»);
Serial.println(port);

Serial.flush();
while(Serial.read()!=’K’);

Serial.print(«AT+TCPWRITE=»);
Serial.println(longitud, DEC); //Sends TCP data
Serial.flush();

do
{
while (Serial.available() == 0) {};
//Serial.println(char(Serial.read()));
} while(Serial.read()!=’>’);

Serial.println(tosend);

x=0;

do
{
while(Serial.available()==0);
data[x]=Serial.read();
x++;
}
while(!(data[x-1]==’K’&&data[x-2]==’O’));

Serial.println(«AT+NETCLOSE»); //Opens the socket with the type of protocol and the port
Serial.flush();
while(Serial.read()!=’K’);

while(1);

}

Camera for Photo Diagnosis

Este módulo permite la conexión de una cámara para grabar video y tomar fotos. Una vez guardado el archivo de vídeo o la imagen se pueden enviar a un servidor FTP o FTPS como se verá más adelante. Las imágenes con tutorial módulo 3G.
 
Cámara para el escudo 3G
Inserte la cámara con los contactos metálicos hacia arriba
Example Code
Take photos is very easy. Upload the next code.

Show Code

/*
*  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
*  http://www.libelium.com
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see .
*
*  Version 0.1
*  Author: Alejandro Gállego
*/

int led = 13;
int onModulePin = 2; // the pin to switch on the module (without press on button)

int x = 0;

char name[20];

void switchModule(){
digitalWrite(onModulePin,HIGH);
delay(2000);
digitalWrite(onModulePin,LOW);
}

void setup(){

Serial.begin(115200); // UART baud rate
delay(2000);
pinMode(led, OUTPUT);
pinMode(onModulePin, OUTPUT);
switchModule(); // switches the module ON

for (int i=0;i < 5;i++){
delay(5000);
}

Serial.println(«AT+CCAMS»); //starts the camera
while(Serial.read()!=’K’);

Serial.println(«AT+CCAMSETD=640,480»); //sets VGA (640*480) resolution
while(Serial.read()!=’K’);

Serial.println(«AT+FSLOCA=0»); //stores the image file in the 3G module
while(Serial.read()!=’K’);

}

void loop(){

delay(1500);
while(Serial.available()!=0){
Serial.read();
}
Serial.println(«AT+CCAMTP»); //takes a picture, but not saved it
while(Serial.read()!=’K’);

Serial.println(«AT+CCAMEP»); // saves the picture into C:/Picture
Serial.flush();
while(Serial.read()!=’/’);
while(Serial.read()!=’/’);

x=0;
do{
while(Serial.available()==0);
name[x]=Serial.read();
x++;
}while(x < 19);

while(Serial.read()!=’K’);
Serial.println(name);

Serial.println(«AT+CCAME»); // stops the camera
while(Serial.read()!=’K’);

while(1);

}

Example picture 1: (Snake bite telemedicine simulation)
Example picture 2: (Patient photo)
Snake bites occur when a snake bites the skin. They are medical emergencies if the snake is poisonous.
Sending images via 3g is a simple and rapid method for medical consultation
Refer to 3G tutorials (Arduino) (Raspberry) for more information.
Para saber más,pulse aquí