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
live_loop :test do | |
with_fx :bitcrusher, bits: 8, mix: 0.25 do | |
sample :drum_bass_soft | |
sleep 0.5 | |
sample :drum_bass_soft | |
sample :drum_snare_soft | |
sleep 0.5 | |
sample :drum_bass_soft |
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
var UI = require('ui'); | |
// Create a Card with title and subtitle | |
var card = new UI.Card({ | |
title:'Weather', | |
subtitle:'Fetching...' | |
}); | |
// Display the Card | |
card.show(); |
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 <pebble.h> | |
static Window *s_main_window; | |
static TextLayer *s_time_layer; | |
static void update_time() { | |
// Get a tm structure | |
time_t temp = time(NULL); | |
struct tm *tick_time = localtime(&temp); |
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
led <- hardware.pin9; // LED Pin | |
ledState <- 0; // Current state of the LED | |
// Configure the LED | |
led.configure(DIGITAL_OUT, ledState); | |
function blink() { | |
// run blink() again in half a second | |
imp.wakeup(0.5, blink); | |
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
#require "lsm9ds0.class.nut:1.1" | |
/* RUNTIME START ------------------------------------------------------------ */ | |
function xm_int1_cb() { | |
// you may want/need to debounce this function | |
if (xm_int1.read()) { | |
if (imu.clickIntActive()) { | |
server.log("Click interrupt on XM_INT1"); | |
} | |
} else { |
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
device.on("data", function(data) { | |
server.log(http.jsonencode(data)); | |
}); |
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
device.on("data", function(data) { | |
server.log(http.jsonencode(data)); | |
}); |
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
// Copyright (c) 2014 Electric Imp | |
// This file is licensed under the MIT License | |
// http://opensource.org/licenses/MIT | |
class LSM9DS0TR { | |
static WHO_AM_I_G = 0x0F; | |
static CTRL_REG1_G = 0x20; | |
static CTRL_REG2_G = 0x21; | |
static CTRL_REG3_G = 0x22; | |
static CTRL_REG4_G = 0x23; |
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
local html = @"<!doctype html> | |
<html lang=""en""> | |
<head> | |
<title>Humidity Control</title> | |
<link rel=""stylesheet"" href=""https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"" /> | |
<link rel=""stylesheet"" href=""//d2c5utp5fpfikz.cloudfront.net/2_3_1/css/bootstrap.min.css"" > | |
<link rel=""stylesheet"" href=""//d2c5utp5fpfikz.cloudfront.net/2_3_1/css/bootstrap-responsive.min.css"" > | |
</head> | |
<body> | |
<div class='well' style='max-width: 320px; margin: 0 auto 10px; height:480px; font-size:22px;'> |
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
/******************** Constants ********************/ | |
// Your MailGun settings | |
const API_KEY = "key-a1b2c3..."; | |
const SUBDOMAIN = "sandbox123abc.mailgun.org"; | |
// Define what email to notify | |
const EMAIL = "you@example.com"; | |
/******************** LIBRARY CODE ********************/ | |
function SendEmail(to, subject, text) { |
NewerOlder