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 bluepy | |
| from bluepy import sensortag | |
| import math | |
| def main(): | |
| import time | |
| import sys | |
| import argparse | |
| parser = argparse.ArgumentParser() |
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
| from bluepy.btle import Scanner, DefaultDelegate | |
| class ScanDelegate(DefaultDelegate): | |
| def __init__(self): | |
| DefaultDelegate.__init__(self) | |
| def handleDiscovery(self, dev, isNewDev, isNewData): | |
| if isNewDev: | |
| print "Discovered device", dev.addr | |
| elif isNewData: |
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
| from bluepy.btle import UUID, Peripheral, DefaultDelegate, AssignedNumbers | |
| import struct | |
| import math | |
| def _TI_UUID(val): | |
| return UUID("%08X-0451-4000-b000-000000000000" % (0xF0000000+val)) | |
| # Sensortag versions | |
| AUTODETECT = "-" | |
| SENSORTAG_V1 = "v1" |
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
| package me.flyingrub.mibandnotify.miband; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.UUID; | |
| public class MiBandService { | |
| public static final String MAC_ADDRESS_FILTER = "88:0F:10"; |
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
| package com.example.brian.myapplication_timer_handler; | |
| import android.os.Handler; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| public class MainActivity extends AppCompatActivity { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
| </head> | |
| <style> | |
| body{ | |
| margin: 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> | |
| <script src="https://www.gstatic.com/firebasejs/4.1.3/firebase.js"></script> | |
| <<link rel="stylesheet" type="text/css" href="./todo.css"> | |
| </head> | |
| <style> | |
| body{ |
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 org.eclipse.paho.client.mqttv3.MqttCallback; | |
| import org.eclipse.paho.client.mqttv3.MqttClient; | |
| import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
| import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
| import org.eclipse.paho.client.mqttv3.MqttException; | |
| import org.eclipse.paho.client.mqttv3.MqttMessage; | |
| import org.eclipse.paho.client.mqttv3.MqttTopic; | |
| public class SimpleMqttClient implements MqttCallback { |
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
| package mqtt.demo; | |
| import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
| import org.eclipse.paho.client.mqttv3.MqttAsyncClient; | |
| import org.eclipse.paho.client.mqttv3.MqttCallback; | |
| import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
| import org.eclipse.paho.client.mqttv3.MqttException; | |
| import org.eclipse.paho.client.mqttv3.MqttMessage; | |
| import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; |
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 org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
| import org.eclipse.paho.client.mqttv3.MqttAsyncClient; | |
| import org.eclipse.paho.client.mqttv3.MqttCallback; | |
| import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
| import org.eclipse.paho.client.mqttv3.MqttException; | |
| import org.eclipse.paho.client.mqttv3.MqttMessage; | |
| import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; | |
| public class MqttClientAsync implements MqttCallback { |
OlderNewer