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
Handler handler = new Handler(Looper.getMainLooper()); | |
final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE); | |
displayManager.registerDisplayListener(new DisplayManager.DisplayListener() { | |
@Override | |
public void onDisplayAdded(int displayId) { | |
} | |
@Override |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="net.redlinesoft.hellowear"> | |
<uses-feature android:name="android.hardware.type.watch" /> | |
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<application |
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 required libraries | |
#include <Adafruit_CC3000.h> | |
#include <SPI.h> | |
#include <CC3000_MDNS.h> | |
#include <aREST.h> | |
// These are the pins for the CC3000 chip if you are using a breakout board | |
#define ADAFRUIT_CC3000_IRQ 3 | |
#define ADAFRUIT_CC3000_VBAT 5 | |
#define ADAFRUIT_CC3000_CS 10 |
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
/*************************************************** | |
This is a sketch to use the CC3000 WiFi chip & Xively | |
Written by Marco Schwartz for Open Home Automation | |
Modified code for read temperature from LM35 | |
****************************************************/ | |
// Libraries |
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
{ | |
"containers":[ | |
{ | |
"name":"rockmongo", | |
"count":1, | |
"image":"openshift/centos-rockmongo", | |
"publicports":[ | |
{"internal":80,"external":6060} | |
], | |
"links":[ |
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
#cloud-config | |
hostname: coreos01 | |
coreos: | |
units: | |
- name: docker.service | |
command: start | |
users: |
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/python | |
import sys | |
import time | |
import Adafruit_DHT | |
sensor = Adafruit_DHT.DHT22 | |
pin = 4 | |
while True: | |
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin) |
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
/* | |
AUTHOR: Hazim Bitar (techbitar) | |
DATE: Aug 29, 2013 | |
LICENSE: Public domain (use at your own risk) | |
CONTACT: techbitar at gmail dot com (techbitar.com) | |
*/ | |
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
char BYTE; | |
int LED = 13; // LED on pin 13 | |
void setup() { | |
Serial.begin(9600); | |
pinMode(LED, OUTPUT); | |
} | |
void loop() { | |
Serial.println("Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF:"); |
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
char BYTE; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
while (!Serial.available()); // stay here so long as COM port is empty | |
BYTE = Serial.read(); // read next available byte | |
Serial.print(BYTE); |
OlderNewer