Feel the heat with Arduino and Cayenne

details

Feel the heat with Arduino and Cayenne

2016-12-23_arduino

This project is an example of Ethernet shield.
User can manage his house easily by using Arduino platform through Web.
This project would be included in Remote control category of WIZnet Museum.

Hardware components:

-. Arduino UNO & Genuino UNO

-. Arduino Ethernet Shield

-. 4-Channel 5V Relay Module

-. Step Down Adjustable Power Supply

-.Relay(generic)

-. AC-DC industrial DIN rail power supply

-. Miniature Circuit Breaker

 

Software apps and online services:

-. Arduino IDE

-. Cayenne

 

Story

 

 

 Schematics

8jutbslpphuvunjawzuw

 

 

Code

#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>

// If you're not using the Ethernet W5100 shield, change this to match your connection type. See Communications examples.
#include <CayenneEthernet.h>

// Virtual Pin of the DS18B20 widget.
#define VIRTUAL_PIN V10

// Digital pin the DS18B20 is connected to. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
const int tmpPin = 14;

OneWire oneWire(tmpPin);
DallasTemperature sensors(&oneWire);

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "xxxxxx";

void setup()
{
	Serial.begin(9600);
	Cayenne.begin(token);
	sensors.begin();
}

void loop()
{
	Cayenne.run();
}

// This function is called when the Cayenne widget requests data for the Virtual Pin.
CAYENNE_OUT(VIRTUAL_PIN)
{
	// Send the command to get temperatures.
	sensors.requestTemperatures();
	// This command writes the temperature in Celsius to the Virtual Pin.
	Cayenne.celsiusWrite(VIRTUAL_PIN, sensors.getTempCByIndex(0));
	// To send the temperature in Fahrenheit use the corresponding code below.
	//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}

 

 

If you want to know more in detail, refer to

Source : https://www.hackster.io/user3111302/feel-the-heat-with-arduino-and-cayenne-b67a60?ref=user&ref_id=115807&offset=1расчетно кассовое обслуживание банки

 

Collected by Jim : jim@wiznet.io

Feel the heat with Arduino and Cayenne

2016-12-23_arduino

This project is an example of Ethernet shield.
User can manage his house easily by using Arduino platform through Web.
This project would be included in Remote control category of WIZnet Museum.

Hardware components:

-. Arduino UNO & Genuino UNO

-. Arduino Ethernet Shield

-. 4-Channel 5V Relay Module

-. Step Down Adjustable Power Supply

-.Relay(generic)

-. AC-DC industrial DIN rail power supply

-. Miniature Circuit Breaker

 

Software apps and online services:

-. Arduino IDE

-. Cayenne

 

Story

 

 

 Schematics

8jutbslpphuvunjawzuw

 

 

Code

#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>

// If you're not using the Ethernet W5100 shield, change this to match your connection type. See Communications examples.
#include <CayenneEthernet.h>

// Virtual Pin of the DS18B20 widget.
#define VIRTUAL_PIN V10

// Digital pin the DS18B20 is connected to. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
const int tmpPin = 14;

OneWire oneWire(tmpPin);
DallasTemperature sensors(&oneWire);

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "xxxxxx";

void setup()
{
	Serial.begin(9600);
	Cayenne.begin(token);
	sensors.begin();
}

void loop()
{
	Cayenne.run();
}

// This function is called when the Cayenne widget requests data for the Virtual Pin.
CAYENNE_OUT(VIRTUAL_PIN)
{
	// Send the command to get temperatures.
	sensors.requestTemperatures();
	// This command writes the temperature in Celsius to the Virtual Pin.
	Cayenne.celsiusWrite(VIRTUAL_PIN, sensors.getTempCByIndex(0));
	// To send the temperature in Fahrenheit use the corresponding code below.
	//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}

 

 

If you want to know more in detail, refer to

Source : https://www.hackster.io/user3111302/feel-the-heat-with-arduino-and-cayenne-b67a60?ref=user&ref_id=115807&offset=1расчетно кассовое обслуживание банки

 

Collected by Jim : jim@wiznet.io

COMMENTS

Please Login to comment
  Subscribe  
Notify of