This file contains hidden or 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 <Arduino.h> | |
#define MY_DEBUG | |
#define MY_BAUD_RATE 9600 | |
// Mode Radio / Enable and select radio type attached | |
#define MY_RADIO_NRF5_ESB | |
#define MY_NRF5_ESB_PA_LEVEL NRF5_PA_MAX | |
#define MY_NODE_ID 6 | |
#include "MySensors.h" | |
#include <Wire.h> |
This file contains hidden or 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/env bash | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-blocking.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-clast-to-gimple.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-dependences.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-interchange.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-optimize-isl.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-poly.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-scop-detection.c | |
gsed -i '1s/^/#include <stddef.h>\n/' crosstool-NG/.build/src/gcc-4.8.2/gcc/graphite-sese-to-poly.c |
This file contains hidden or 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
static uint16 crc16(uint16 crc, uint8 val) { | |
const uint16 poly = 0x1021; | |
uint8 cnt; | |
for (cnt = 0; cnt < 8; cnt++, val <<= 1) | |
{ | |
uint8 msb = (crc & 0x8000) ? 1 : 0; | |
crc <<= 1; |
This file contains hidden or 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
/* YourDuino.com Example Software Sketch | |
DHT11 Humidity and Temperature Sensor test | |
Credits: Rob Tillaart | |
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=162 | |
[email protected] */ | |
/*-----( Import needed libraries )-----*/ | |
#include <dht11.h> | |
/*-----( Declare objects )-----*/ |
This file contains hidden or 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> | |
// Important!! We use pin 13 for enable esp8266 | |
#define WIFI_ENABLE_PIN 13 | |
#define DEBUG 1 | |
#define SSID "YOUR-WIFI-SSID" | |
#define PASS "YOUR-WIFI-SECRET" |
This file contains hidden or 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
byte inbuff[255]; | |
byte outbuff[255]; | |
#define rate 115200 | |
void setup() { | |
Serial.begin(rate); | |
while (!Serial) ; | |
Serial1.begin(rate); | |
while (!Serial1); |
This file contains hidden or 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
String tmp; | |
void setup() { | |
Serial.begin(115200); | |
Serial1.begin(115200); | |
while (!Serial) { | |
; // wait for serial port to connect. Needed for Leonardo only | |
} | |
Serial.println("hello!"); |
This file contains hidden or 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
[Unit] | |
Description=/etc/rc.local Compatibility | |
ConditionPathExists=/etc/rc.local | |
[Service] | |
Type=forking | |
ExecStart=/etc/rc.local | |
TimeoutSec=0 | |
StandardOutput=tty | |
RemainAfterExit=yes |
This file contains hidden or 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 RXLED = 17; // The RX LED has a defined Arduino pin | |
// The TX LED was not so lucky, we'll need to use pre-defined | |
// macros (TXLED1, TXLED0) to control that. | |
// (We could use the same macros for the RX LED too -- RXLED1, | |
// and RXLED0.) | |
void setup() | |
{ | |
pinMode(RXLED, OUTPUT); // Set RX LED as an output | |
// TX LED is set as an output behind the scenes |
This file contains hidden or 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
#!/bin/sh | |
# | |
# This hook does two things: | |
# | |
# 1. update the "info" files that allow the list of references to be | |
# queries over dumb transports such as http | |
# | |
# 2. if this repository looks like it is a non-bare repository, and | |
# the checked-out branch is pushed to, then update the working copy. | |
# This makes "push" function somewhat similarly to darcs and bzr. |
NewerOlder