Things used in this project

Code

Code snippet #1Arduino
<p>#include "DHT.h"<br>//#define CAYENNE_DEBUG         // Uncomment to show debug messages<br>#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include </p><p>#define DHTPIN 8     // what digital pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321</p><p>#define VIRT_TEMP V1
#define VIRT_HUM V2</p><p>// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "your toker";</p><p>DHT dht(DHTPIN, DHTTYPE);
unsigned long prev_DHT_refresh, interval_DHT_refresh = 1000;</p><p>void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token);</p><p>  dht.begin();
}</p><p>void loop()
{
  Cayenne.run();</p><p>  getDhtValues();</p><p>}</p><p>void getDhtValues() {
    unsigned long now = millis();
  
  if (now - prev_DHT_refresh > interval_DHT_refresh) {
    // Reading temperature or humidity takes about 250 milliseconds!
    // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
    float h = dht.readHumidity();
    // Read temperature as Celsius (the default)
    float t = dht.readTemperature();</p><p>    // Check if any reads failed
    if (!isnan(h) && !isnan(t)) {
      Cayenne.virtualWrite(VIRT_HUM, h);
      Cayenne.celsiusWrite(VIRT_TEMP, t);
    }
    prev_DHT_refresh = now;
  }
}</p>
Code snippet #9SH
SAVEDIR=/home/pi/Desktop/timelapse/

while [ true ]; 

do filename=-$(date -u +"%d%m%Y_%H%M-%S").jpg
/opt/vc/bin/raspistill -o $SAVEDIR/$filename
sleep 3600;
done;

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Arduino - Web-based Joystick
Easy
  • 15
  • 4

Full instructions

This project shows how to control devices from anywhere using web-based joystick on smart phone

Distance Indicator Using Ultrasonic Sensor
Easy
  • 35
  • 3

Work in progress

This project lights a set of LED's depending upon the distance of the obstacle with respect to the ultrasonic sensor.

BluSpike - Community Driven BLE Sensor Network
Easy
  • 30
  • 2

Full instructions

Easy to build w/ off the shelf parts, BLE solar powered sensor array. Connect and share its data to the cloud and be rewarded with ethereum

NeoPixel Thermometer!
Easy
  • 90
  • 4

Full instructions

Transforms a NeoPixel ring into a cool thermometer

Arduino - Web-Based Thermometer
Easy
  • 1,035
  • 15

Full instructions

This project allows you to check temperature at home from anywhere using web browser.

Arduino - Have Fun with Color Sensor
Easy
  • 952
  • 13

Full instructions

This project shows how to change color of Minion using Arduino, PHPoC WiFi Shield and color sensor.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login