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> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
SoftwareSerial ble(2, 3); // RX, TX | |
byte sineWave[] = {128,168,203,232,250,255,250,232,203,168,128,88,53,24,6,0,6,24,53,88}; | |
byte current = 0; | |
byte incoming = 0; |
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> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
SoftwareSerial ble(2, 3); // RX, TX | |
byte sineWave[] = {128,168,203,232,250,255,250,232,203,168,128,88,53,24,6,0,6,24,53,88}; | |
byte current = 0; | |
OneWire oneWire(4); |
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> | |
SoftwareSerial ble(2, 3); // RX, TX | |
byte sineWave[] = {128,168,203,232,250,255,250,232,203,168,128,88,53,24,6,0,6,24,53,88}; | |
byte current = 0; | |
void setup() { | |
Serial.begin(9600); | |
ble.begin(9600); | |
} |
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
<link rel="stylesheet" href="main.css" /> | |
<div class="responsive-inline-frame"> | |
<div class="responsive-inline-frame-inner"> | |
<iframe src="https://datastudio.google.com/embed/reporting/1KdAXcyb-l5X6FR9Vigu8-ExNirb5pNoB/page/MZES" frameborder="0" allowfullscreen></iframe> | |
</div> | |
</div> |
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
apply plugin:'groovy' | |
apply plugin:'idea' | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.2' | |
//random comment to offset height of embedded gist | |
//random comment to offset height of embedded gist | |
//random comment to offset height of embedded gist |
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
const uint8_t fontWidth = 8; | |
const unsigned char font[96][8] = { | |
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // | |
{0x00,0x5f,0x00,0x00,0x00,0x00,0x00,0x00}, // ! | |
{0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00}, // " | |
{0x0a,0x1f,0x0a,0x1f,0x0a,0x00,0x00,0x00}, // # | |
{0x24,0x2a,0x2a,0x7f,0x2a,0x2a,0x12,0x00}, // $ | |
{0x00,0x47,0x25,0x17,0x08,0x74,0x52,0x71}, // % | |
{0x00,0x36,0x49,0x49,0x49,0x41,0x41,0x38}, // & | |
{0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00}, // ' |
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 <iostream> | |
#include <cstring> | |
int readPage(int page, uint8_t *dest); | |
int writePage(int page, uint8_t *src); | |
const int EEPROM_SIZE = 32000; //bytes | |
const int PAGE_SIZE = 64; //bytes | |
uint8_t data[EEPROM_SIZE]; |
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
public class reverse { | |
public static void main(String[] args) { | |
long x = 98735420298374322L; | |
long reverse; | |
long start = System.nanoTime(); | |
reverse = reverseIntrinsic(x); |
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
import Cocoa | |
class LinearCongruntialGenerator { | |
var state = 0 //seed of 0 by default | |
let a, c, m, shift: Int | |
//we will use microsoft random by default | |
init() { | |
self.a = 214013 |
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
import Cocoa //include Cocoa library (standard in OS X) | |
let fruits = ["apple", "orange"] //declare constant array literal | |
let fruitsCount = fruits.count //declare constant array length (count) | |
print(fruitsCount) //print array length to output window |
NewerOlder