Skip to content

Instantly share code, notes, and snippets.

💭

El Bruno elbruno

💭
Block or report user

Report or block elbruno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ListBlueToothDevices
using System;
using InTheHand.Net.Sockets;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
var bluetoothClient = new BluetoothClient();
@elbruno
elbruno / PebbleButtonsHandlersSample
Last active Aug 29, 2015
Pebble Buttons Handlers Sample
View PebbleButtonsHandlersSample
#include <pebble.h>
Window *my_window;
TextLayer *text_layer;
void handle_init(void) {
my_window = window_create();
window_set_click_config_provider(window, click_config_provider);
text_layer = text_layer_create(GRect(0, 0, 144, 20));
window_stack_push(my_window, true);
@elbruno
elbruno / PebbleSampleButtons02
Created May 9, 2014
Pebble Sample Buttons 02
View PebbleSampleButtons02
#include <pebble.h>
Window *window;
TextLayer *text_layer;
/* Buttons Handlers */
void up_click_handler(ClickRecognizerRef recognizer, void *context)
{
APP_LOG(APP_LOG_LEVEL_DEBUG, "Button Up !");
@elbruno
elbruno / PebbleSampleButtons03
Created May 15, 2014
PebbleSampleButtons03
View PebbleSampleButtons03
#include <pebble.h>
Window *window;
GBitmap *nino_bitmap;
BitmapLayer *nino_layer;
int imageYLocation;
int difY;
void on_animation_stopped(Animation *anim, bool finished, void *context)
{
@elbruno
elbruno / ArduinoAccelerometerLightStrip
Created May 17, 2014
ArduinoAccelerometerLightStrip
View ArduinoAccelerometerLightStrip
#include <Wire.h>
#include "MMA7660.h"
MMA7660 acc;
int brightness = 0; // how bright the LED is
int ledStrip = 6; // the pin that the LED is attached to
int accelerometer = 13; // the pin that the accelerometer sensor is attached
int fadeAmount = 5; // how many points to fade the LED by
void setup()
{
@elbruno
elbruno / AccelerometerSample01
Created May 27, 2014
AccelerometerSample01
View AccelerometerSample01
#include <pebble.h>
#define MATH_PI 3.141592653589793238462
#define NUM_DISCS 20
#define DISC_DENSITY 0.25
#define ACCEL_RATIO 0.05
#define ACCEL_STEP_MS 50
Window *window;
TextLayer *text_layer;
static AppTimer *timer;
@elbruno
elbruno / ElBrunoLync2Pebble
Created May 28, 2014
ElBruno Lync to Pebble
View ElBrunoLync2Pebble
static void Main()
{
WriteAppTitle();
if (ConnectToPebble()) return;
var client = LyncClient.GetClient();
client.ConversationManager.ConversationAdded += ConversationManager_ConversationAdded;
Console.WriteLine("Press Enter to exit.");
Console.ReadLine();
}
@elbruno
elbruno / ElBrunoLeapV2Controller
Created May 29, 2014
El Bruno - Leap V2 SDK Beta Controller
View ElBrunoLeapV2Controller
using System;
using System.Threading.Tasks;
using Leap;
namespace ElBruno.LeapV2NewFeatures
{
public class MotionListener : Listener
{
public event Action<bool, bool> OnLeftOrRightHand;
public event Action<float, float> OnPitchAndGrab;
@elbruno
elbruno / KinectSdkV2FrameLifeCycle
Created Jun 10, 2014
KinectSdk V2, be sure of lifecycle of objects
View KinectSdkV2FrameLifeCycle
static void _bodyFrameReader_FrameArrived(object sender, BodyFrameArrivedEventArgs e)
{
var frame = e.FrameReference.AcquireFrame();
if (null == frame) return;
using (frame)
{
frame.GetAndRefreshBodyData(_bodies);
foreach (var body in _bodies)
@elbruno
elbruno / ElBrunoGetXBoxOnControllere
Created Jun 27, 2014
Sample code to get the DeviceInfo for a XBoxOne Controller
View ElBrunoGetXBoxOnControllere
using System.Linq;
using DeviceManagement;
namespace ConsoleApplication2
{
class DeviceInspection
{
public DeviceInfo GetXBoxController()
{
// you need nuget pkg https://devicemgr.codeplex.com/
You can’t perform that action at this time.