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 <math.h> | |
#define THERMISTOR 7 | |
#define SWITCH 1 | |
#define A_PIN 4 | |
const double beta = 3977.0; | |
const double zeroC = 273.15; | |
const double tzero = 25 + zeroC; |
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
######################################################################## | |
# | |
# Arduino command line tools Makefile | |
# System part (i.e. project independent) | |
# | |
# Copyright (C) 2010 Martin Oldfield <m@mjo.tc>, based on work that is | |
# Copyright Nicholas Zambetti, David A. Mellis & Hernando Barragan | |
# | |
# This file is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU Lesser General Public License as |
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 LIGHT 5 | |
#define MOTION 0 | |
#define SWITCH 1 | |
#define LEDS 2 | |
#define DUSK 4 | |
#define HZ 4 | |
#define SAMPLES (15*HZ) | |
#define ON_DELAY (30*60*HZ) | |
#define OFF_DELAY (15*HZ) |
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
#!/usr/bin/perl | |
use warnings; | |
use Xbee::API; | |
use Data::Dumper; | |
my $port = "/dev/ttyUSB0"; | |
my $end_device = "0013a20040769646"; | |
my $remaddr = pack( "H*", $end_device ); | |
my $devaddr = pack( "H4", "fffe" ); |
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 <EEPROM.h> | |
#define MOTION 1 | |
#define SWITCH 0 | |
#define LIGHT 2 | |
#define LDR 3 | |
#define HZ 4 | |
#define SAMPLES (15*HZ) | |
#define ON_DELAY (15*60*HZ) |
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 <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <termios.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <stdio.h> |
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 <unistd.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "xbee.h" | |
#include "lcd.h" | |
static int send_sync(int fd, uint8_t *remote, char *cmd, uint8_t *data, uint16_t n) | |
{ |
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
int open_device(char *device, int speed); | |
#define AT_REQUEST 0x08 | |
#define REMOTE_AT_REQUEST 0x17 | |
#define AT_RESPONSE 0x88 | |
#define REMOTE_AT_RESPONSE 0x97 | |
struct at_response { | |
uint8_t api_id, frame_id; | |
uint8_t cmd[2]; |
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 __STDC_LIMIT_MACROS 1 | |
#include <stdint.h> | |
#define BOFF 2 | |
#define BON 3 | |
#define RS 3 | |
#define EN 4 | |
int bitmap[] = {6, 7, 8, 13, 12, 11, 10, 9 }; |
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 __STDC_LIMIT_MACROS 1 | |
#include <stdint.h> | |
#include <avr/sleep.h> | |
#include <avr/interrupt.h> | |
void setup() { | |
pinMode(0, OUTPUT); | |
pinMode(2, INPUT); | |
OlderNewer