This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name: Makefile | |
# Author: <insert your name here> | |
# Copyright: <insert your copyright message here> | |
# License: <insert your license reference here> | |
# DEVICE ....... The AVR device you compile for | |
# CLOCK ........ Target AVR clock rate in Hertz | |
# OBJECTS ...... The object files created from your source files. This list is | |
# usually the same as the list of source files with suffix ".o". | |
# PROGRAMMER ... Options to avrdude which define the hardware you use for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define F_CPU 1000000 // CPU frequency for proper time calculation in delay function | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRD |= (1 << PD6); // make PD6 an output | |
for(;;)//infinite loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#include <stdlib.h> | |
#include <String.h> | |
#include <dht.h> | |
dht DHT; | |
#define DHT11_PIN 5 | |
// thingspeak API key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#include <stdlib.h> | |
#include <String.h> | |
String reset = "AT+RST"; | |
String twitterAPIKey = "B2K5PVPQTRMP4563"; | |
String tweetURI = "/apps/thingtweet/1/statuses/update"; | |
String thingSpeak = "api.thingspeak.com"; | |
String urlEncoded = "application/x-www-form-urlencoded"; | |
String cmd; |