Вы находитесь на странице: 1из 17

Sensor de Aparcamiento.

Raspberry Pi.
En realidad, se trata de una diminuta placa base de 85 x 54 milímetros (un poco
más grande que una cajetilla de tabaco) en el que se aloja un chip Broadcom
BCM2835 con procesador ARM hasta a 1 GHz de velocidad, GPU VideoCore IV
y hasta 512 Mbytes de memoria RAM. En cuanto a su precio, suele estar por
debajo de los 40 euros, una de las razones que explica su popularidad. De
hecho, a finales de 2013 se superaron ya las dos millones de unidades vendidas
en todo el mundo.
Materiales Para Sensor de Aparcamiento.

Raspberry Pi Model B.

USB WiFi Dongle.

Motion sensor by Parallax.

Three female to female wires.


Conexión de Cables en la Placa.
Configuración de plataforma Ubidots.
Establecer reglas.
Notificacion a correo electrónico
Notificacion a Correo electrónico
Valores Estadísticos.
Script Raspberry.
import RPi.GPIO as GPIO ##GPIO library
from ubidots import ApiClient ##Ubidots Library
import time ##time library for delays
GPIO.setmode(GPIO.BCM)##set up BCM as numbering system for inputs
GPIO.setup(7,GPIO.IN)##Declaring GPIO7 as input for the sensor
try: api=ApiClient("XXXXXXXXXXXXXXX")##put your own apikey
people= api.get_variable("XXXXXXXXX")##put your own variable's id
except: print "cant connect"##if this happens check your internet conection
while(1): presence=GPIO.input(7)#)# saving the value of the sensor
if(presence==0):##if presence is zero that means the other car is still there
:( people.save_value({'value':presence})##sending value to ubidots
time.sleep(1)##check every 5 seconds if the other car moves
print "cero" if(presence): people.save_value({'value':presence})##the other car left so is empty now :)
time.sleep(1) print "uno"GPIO.cleanup()##reset the status of the GPIO pins
Fuentes :
http://computerhoy.com/noticias/hardware/que-es-raspberry-pi-donde-compra
rla-como-usarla-8614

https://app.ubidots.com
Luis Delascar Valencia.
@dekrs.
dekarpac@gmail.com
GRACIAS

Вам также может понравиться