Skip to content

Instantly share code, notes, and snippets.

View technobly's full-sized avatar

Brett Walach technobly

View GitHub Profile
@technobly
technobly / sparkBMP085.cpp
Last active January 2, 2016 18:19
BMP085/BMP180 Barometric Pressure + Temp sensor for Spark Core
//-----------------------------------------------------------------
// BMP085/BMP180 Barometric Pressure + Temp sensor for Spark Core
//=================================================================
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//-----------------------------------------------------------------
// Technobly / BDub - Jan 2014
//=================================================================
/***************************************************
@technobly
technobly / sparkAssembly1.cpp
Created January 9, 2014 21:36
Intro to Inline Assembly on the Spark Core #1
//--------------------------------------------------
// Intro to Inline Assembly on the Spark Core (WIP)
//==================================================
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//--------------------------------------------------
// Technobly / BDub - Jan 2014
//==================================================
uint16_t pin = D0;
@technobly
technobly / sparkDS1307.cpp
Last active May 14, 2016 06:28
RTC DS1307 LIBRARY FOR SPARK CORE
//-----------------------------------------------//
// RTC DS1307 LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
// !! Pinouts on line 254 below !! //
//-----------------------------------------------//
// Technobly / BDub - Jan 12th 2014 //
//===============================================//
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
@technobly
technobly / sparkMCP23008LCD.cpp
Last active January 3, 2016 11:49
MCP23008 I2C / SPI LCD BACKPACK LIBRARY FOR SPARK COREhttp://www.adafruit.com/products/292
//-----------------------------------------------//
// I2C / SPI LCD BACKPACK LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
// !! Pinouts on line 427 below !! //
//-----------------------------------------------//
// Technobly / BDub - Jan 16th 2014 //
//===============================================//
@technobly
technobly / sparkRSTriLED.cpp
Last active June 18, 2016 15:09
Spark Core library to control RadioShack Tricolor LED Strip
/*-------------------------------------------------------------------------
Spark Core library to control RadioShack Tricolor LED Strip
Currently handles 400 KHz bitstream on Spark Core,
with LEDs wired for GRB color order.
Written by Phil Burgess / Paint Your Dragon for Adafruit Industries.
Modified to work with Spark Core by Technobly.
Contributions by PJRC and other members of the open source community.
Adafruit invests time and resources providing this open source code,
@technobly
technobly / sparkFastRead.cpp
Created January 23, 2014 06:29
FAST READ EXAMPLE for SPARK CORE
//-----------------------------------------------
// Fast Read Example
//===============================================
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//-----------------------------------------------
// Technobly / BDub - Jan 22nd 2014
//===============================================
#pragma GCC diagnostic ignored "-Wunused-value"
@technobly
technobly / sparkTCPClientJSONParse.cpp
Last active October 12, 2017 17:13
TCP CLIENT JSON PARSE EXAMPLE
#include "application.h"
/* ================ HTTP ================ */
TCPClient client;
char buffer[1024];
char * http_get(char const * hostname, String path) {
if (client.connect(hostname, 80)) {
client.print("GET ");
@technobly
technobly / sparkGroveLCDRGB.cpp
Last active August 29, 2015 13:55
GROVE LCD RGB Library For Spark Core
//-----------------------------------------------
// GROVE LCD RGB Library For Spark Core
//===============================================
// http://www.seeedstudio.com/wiki/Grove_-_LCD_RGB_Backlight
// https://github.com/Seeed-Studio/Grove_LCD_RGB_Backlight
//-----------------------------------------------
// Technobly / BDub - Jan 30th, 2014
//===============================================
#include "application.h"
@technobly
technobly / sparkRubeGoldLED.cpp
Created February 12, 2014 05:10
SPARK CORE RUBE GOLDBERG LED TOGGLE CHALLENGE
/*
* =================================
* RUBE GOLDBERG LED TOGGLE
* ---------------------------------
* BDub / Technobly - Feb 11th, 2014
* =================================
*
*/
uint16_t TIM_ARR = (uint16_t)(65535/6); // Calc PWM period.