| 24 | == Arduino Sketches and vera plugins == |
| 25 | |
| 26 | [[Image(sdk.png, align=right, 200px)]] |
| 27 | A sketch is a small program that you download to the Arduino boards. To get started download Arduino SDK here: http://arduino.cc/en/Main/Software |
| 28 | |
| 29 | Also make sure to install all Arduino libraries I've created and collected here before trying to build the sensor sketches below. |
| 30 | http://code.mios.com/git_public/mios/arduino-sensor.git/tree/HEAD:/VeraArduino/Arduino/libraries?js=1 |
| 31 | |
| 32 | Follow the description below on how to assemble hardware and configure each type of sensor. I've also tried to link all the hardware necessary to build each sensor [from aliexpress.com]. |
| 33 | |
| 34 | You can connect more than one sensor to each Arduino. Each Pro Mini Arduino has 13 digital in/out pins and 5 analog dito. The radio uses 5 pins so there are plenty left for connecting sensors. Some of them (humidity and pressure) actually use one pin but give also give temperature information (for free) without using any extra pins. |
| 35 | When connecting several sensors to one Arduino you'll also have to combine the example sketches below. Also keep in mind that it could be challenging to use interrupts (to be able to sleep most of the time) when several sensors fight for attention and some of them wants to report at a interval. |
| 36 | |
| 37 | [[ArduinoGateway|Arduino Gateway/Vera Plugin]] |
| 38 | |
| 39 | [[Image(gw.jpg, align=right, 200px)]] |
| 40 | Acts as a link between Vera and your wireless sensors. |
| 41 | This is a mandatory sketch that must be downloaded to an Arduino Nano. This nano is then connected to your Vera using a usb cable. |
| 42 | It is important to use a Arduino Nano board for the ArduinoGateway because it contains a serial usb chipset recognized by Vera. |
| 43 | You will also get instructions on how to install the Vera plugin here. |
| 44 | |
| 45 | [[DallasTemperatureSensor|Dallas Temperature Sensor]] |
| 46 | |
| 47 | This is an example sensor sketch that sends in Dallas temperature information and presents it as a temperature devices in Vera. |
| 48 | |
| 49 | [[DistanceSensor|Distance Sensor]] |
| 50 | |
| 51 | Bed occupancy sensor? Or use it in the garage to show when the car has reached the right location. Why not measure your own length every day using your Vera? |
| 52 | |
| 53 | [[HumiditySensor|Humidity Sensor (DHT22)]] |
| 54 | |
| 55 | Sketch that sends DHT11/22 data to Vera which displays them as a humidity and temperature device. |
| 56 | |
| 57 | [[LightSensor|Light Sensor]] |
| 58 | |
| 59 | Sensor sketch that reports light level and displays it in Vera using a light sensor device. |
| 60 | |
| 61 | [[MotionSensor|Motion Sensor]] |
| 62 | |
| 63 | Motion sensor sketch that triggers a motion sensor security device in Vera. |
| 64 | |
| 65 | [[PressureSensor|Pressure/Temperature/Weather forecast sensor (BMP085)]] |
| 66 | |
| 67 | Example sketch showing how to use a BMP085 pressure sensor to create a simple weather station with forecast calculation. Everything is sent and displayed as a barometer and temperature device in Vera. |
| 68 | |
| 69 | [[SoilMoistSensor|Soil Moisture Sensor]] |
| 70 | |
| 71 | Soil moisture sensor that triggers a security sensor device in Vera. |
| 72 | |
| 73 | [[RelayActuator|Relay Actuator]] |
| 74 | |
| 75 | Relay sketch that can be controlled from Vera using a regular binary light switch device in Vera. |
| 76 | |
| 77 | |
62 | | |
63 | | |
64 | | == Arduino Sketches == |
65 | | |
66 | | [[Image(sdk.png, align=right, 200px)]] |
67 | | A sketch is a small program that you download to the Arduino boards. To get started download Arduino SDK here: http://arduino.cc/en/Main/Software |
68 | | |
69 | | Also make sure to install all Arduino libraries I've created and collected here before trying to build the sensor sketches below. |
70 | | http://code.mios.com/git_public/mios/arduino-sensor.git/tree/HEAD:/VeraArduino/Arduino/libraries?js=1 |
71 | | |
72 | | Follow the description below on how to assemble hardware and configure each type of sensor. I've also tried to link all the hardware necessary to build each sensor [from aliexpress.com]. |
73 | | |
74 | | You can connect more than one sensor to each Arduino. Each Pro Mini Arduino has 13 digital in/out pins and 5 analog dito. The radio uses 5 pins so there are plenty left for connecting sensors. Some of them (humidity and pressure) actually use one pin but give also give temperature information (for free) without using any extra pins. |
75 | | When connecting several sensors to one Arduino you'll also have to combine the example sketches below. Also keep in mind that it could be challenging to use interrupts (to be able to sleep most of the time) when several sensors fight for attention and some of them wants to report at a interval. |
76 | | |
77 | | [[ArduinoGateway|Arduino Gateway]] |
78 | | |
79 | | [[Image(gw.jpg, align=right, 200px)]] |
80 | | Acts as a link between Vera and your wireless sensors. |
81 | | This is a mandatory sketch that must be downloaded to an Arduino Nano. This nano is then connected to your Vera using a usb cable. |
82 | | It is important to use a Arduino Nano board for the ArduinoGateway because it contains a serial usb chipset recognized by Vera. |
83 | | |
84 | | [[DallasTemperatureSensor|Dallas Temperature Sensor]] |
85 | | |
86 | | This is an example sensor sketch that sends in Dallas temperature information and presents it as a temperature devices in Vera. |
87 | | |
88 | | [[DistanceSensor|Distance Sensor]] |
89 | | |
90 | | Bed occupancy sensor? Or use it in the garage to show when the car has reached the right location. Why not measure your own length every day using your Vera? |
91 | | |
92 | | [[HumiditySensor|Humidity Sensor (DHT22)]] |
93 | | |
94 | | Sketch that sends DHT11/22 data to Vera which displays them as a humidity and temperature device. |
95 | | |
96 | | [[LightSensor|Light Sensor]] |
97 | | |
98 | | Sensor sketch that reports light level and displays it in Vera using a light sensor device. |
99 | | |
100 | | [[MotionSensor|Motion Sensor]] |
101 | | |
102 | | Motion sensor sketch that triggers a motion sensor security device in Vera. |
103 | | |
104 | | [[PressureSensor|Pressure/Temperature/Weather forecast sensor (BMP085)]] |
105 | | |
106 | | Example sketch showing how to use a BMP085 pressure sensor to create a simple weather station with forecast calculation. Everything is sent and displayed as a barometer and temperature device in Vera. |
107 | | |
108 | | [[SoilMoistSensor|Soil Moisture Sensor]] |
109 | | |
110 | | Soil moisture sensor that triggers a security sensor device in Vera. |
111 | | |
112 | | [[RelayActuator|Relay Actuator]] |
113 | | |
114 | | Relay sketch that can be controlled from Vera using a regular binary light switch device in Vera. |
115 | | |
116 | | |