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 <RF24Network.h> | |
#include <RF24.h> | |
#include <SPI.h> | |
#include <EEPROM.h> | |
RF24 radio(2, 3); | |
RF24Network network(radio); | |
const int rx = 1, tx = 0; |
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
Counting | |
------------ | |
**Permutations** | |
$n! = n(n-1)(n-2) ... 1$ | |
**k-Permutations** | |
$\frac{n!}{(n-k)!}$ | |
**Combinations** |
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
import sys | |
import scipy.sparse as sps | |
import numpy as np | |
nodes = 1000000 | |
beta = 0.8 | |
eps = 1e-6 | |
V = set() | |
degs = {} |
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 <Interrupted.h> | |
#define LED 0 | |
#define TIMER 1 | |
#define BUTTON 2 | |
Watchdog timer(TIMER, 1); | |
External button(BUTTON, LOW); | |
PinChangeGroup portb; | |
PinChange led(LED, portb); |
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 <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) | |
{ |
OlderNewer