Skip to content

Instantly share code, notes, and snippets.

/**
* Subtractive Color Wheel
* by Ira Greenberg.
* Tint routine modified by Miles DeCoster
*
* The primaries are red, yellow, and blue. The secondaries are green,
* purple, and orange. The tertiaries are yellow-orange, red-orange,
* red-purple, blue-purple, blue-green, and yellow-green.
*
* Updated 10 January 2013.
@circuitsenses
circuitsenses / teensy_30_TX
Last active August 29, 2015 13:57
nRF24L01+ RXTX
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
// Teensy 3.0
#define CE_PIN 5
#define CS_PIN 10
// Config Radio (CEPin, CSPin)
@circuitsenses
circuitsenses / midi_teensy_wsrgb
Created March 31, 2014 17:36
Ableton Live + WS2811 LEDs
/*
Control 5 WS2811 RGB LEDs using Ableton Live and USB MIDI
Board - Teensy 3.1
By Rishi Franklin
v1.0 - Basic functionality
This example code is in the public domain.
*/
#include <Adafruit_NeoPixel.h>
@circuitsenses
circuitsenses / Arduino_IoT.ino
Last active August 29, 2015 14:02
Arduino + Sparkfun Weather Shield + Adafruit CC3000 Shield IoT Demo
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
#include <Wire.h> // I2C needed for sensors
#include "MPL3115A2.h" // Pressure sensor
#include "HTU21D.h" // Humidity sensor
@circuitsenses
circuitsenses / MainPageXAML.cs
Created August 28, 2014 17:08
Modulate the camera flash on a Lumia 920 Windows Phone 8 device
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using FlashKontrol.Resources;
using System.Windows.Media;
using Windows.Phone.Media.Capture;
@circuitsenses
circuitsenses / MainPAGE.xaml
Created August 28, 2014 17:10
Modulate the camera flash on a Lumia 920 Windows Phone 8 device - XML
<phone:PhoneApplicationPage
x:Class="FlashKontrol.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
@circuitsenses
circuitsenses / WizNETIoT.ino
Created August 29, 2014 14:36
Arduino + WizNet Ethernet + Xively
#include <SPI.h>
#include <Ethernet.h>
#include <Wire.h> // I2C needed for sensors
#include "MPL3115A2.h" // Pressure sensor
#include "HTU21D.h" // Humidity sensor
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
@circuitsenses
circuitsenses / wave.ino
Created August 29, 2014 14:48
WaveForm
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { "Your MAC" };
@circuitsenses
circuitsenses / UTFT_Fonts.ino
Created August 30, 2014 16:15
Armjishu TFT LCD + Arduino Mega
// UTFT_ViewFont (C)2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the included fonts.
//
// This demo was made for modules with a screen resolution
// of 320x240 pixels.
//
// This program requires the UTFT library.
//
@circuitsenses
circuitsenses / ads7843_touch.ino
Created August 31, 2014 06:12
ADS7843 Touchscreen
#include <ads7843.h>
#define DCLK 51 // SCLK
#define CS 46 // CS
#define DIN 48 // MISO
#define DOUT 47 // MOSI
#define IRQ 49