test project for test contest

/test project for test contest
Total score : 2.5 (2.5 / 1)
|
x 1

Idea

this is for testing the contest feature in cybermakerspace.com

Classification
Automation
O/S
windows
CLOUD
cloud
Project participants
dalia(daliadominict@gmail.com)
Used parts
Classification Part Name Parts link
Arduino Board dsfsf sdfsf
sensor sdsf sfsf

Project summary

fdgfdgdg


Project Content

roject Description

Web-controlled Window Air Conditioner Using an Arduino

by Chris



Overview

It’s done. It works. The internet of things has come to my little apartment in New York City. After about a week of tinkering, soldering, and piecing together bits of code from here and there, I can now load a web page from any browser, see the current temperature in my apartment (and a graph of the last 12 hours), and turn the AC unit on or off with the click of a button. This was accomplished with an Arduino, the open-source prototyping platform and the community of artists, techies and hackers behind it. I’ll show you what it looks like, then I’ll show you how I put it all together (my code is at the bottom if you want to try it yourself! The End Results: The screenshots below are from the web server that is running on the arduino. It simply presents the temperature reading, the ON/OFF state of the Air Conditioner, and a graph from cosm.com of the last 24 hours of temperature readings. The readings are pushed up to cosm.com every 10 seconds. (The screenshots have some wild temperature fluctuations because I was hacking a bit, but the steady temperature you see for most of the day is accurate. The AC was off all day, but it was cool and rainy here in New York City today) This setup does require a dynamic dns name, and port forwarding on my router, which is not the sexiest way to do a remote control connection. It works, and I’ll leave the websockets and pusher.com connections for a later date.

Source

define APIKEY “INSERT API KEY HERE” // your cosm api key

define FEEDID INSERT FEEDID HERE // your feed ID

define USERAGENT “Cosm Arduino Example” // user agent is the project name//sets pin 7 to output, we flash an LED on pin 7 whenever the program uploads data

int ledPin = 7;//mac and ip address for the ethernet shield to use
byte mac

[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,8, 20);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

//Initialize an ethernet client for the cosm uploader
EthernetClient cosm;

IPAddress server2(216,52,233,121); // numeric IP for api.cosm.com

unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
boolean lastConnected = false; // state of the connection last time through the main loop
const unsigned long postingInterval = 10*1000; //delay between updates to Cosm.com
//sets reference voltage to 3.3 volts instead of the default 5. The Ethernet sheild was drawig too much power, and was messing up the readings
void setup()
{
Serial.begin(9600); // open up serial port connection to PC
pinMode(8, OUTPUT); // Set digital pin 8 as output

// start the Ethernet connection and the server:
Ethernet.begin(mac, ip);
server.begin();

analogReference(EXTERNAL);
}

fgdfgdfg dfgdgd defgdg

Major source code
Video URL
1 27 1

One Comment

  1. dalia March 12, 2019 at 12:07 pm - Reply

    my first project

    0

Leave a Reply