Skip to content

Instantly share code, notes, and snippets.

View technobly's full-sized avatar

Brett Walach technobly

View GitHub Profile
@technobly
technobly / Info.md
Last active May 7, 2019 19:10
SMS Test App (with Tinker)
Press a key to run a command:
[l] list unread SMS
[L] list Read SMS
[d] delete SMS (not implemented, but the function is in the code)
[s] send SMS (not implemented, but the function is in the code)
[r] read unread SMS, do not delete or reply
[R] read already read SMS, delete and reply
[a] send an AT command
[h] show this help menu
@technobly
technobly / electron-troubleshooting.cpp
Created April 15, 2016 20:29
Electron Troubleshooting App
// git clone the latest `develop` branch of the `firmware` repo
// COMPILE from firmware/modules $
// make clean all PLATFORM_ID=10 APPDIR=~/code/fw-apps/electron-troubleshooting COMPILE_LTO=n DEBUG_BUILD=y -s program-dfu
//
// NOTE: APPDIR=~/code/fw-apps/electron-troubleshooting can be APP=electron-troubleshooting if that's easier
/* Includes ------------------------------------------------------------------*/
#include "application.h"
#include "cellular_hal.h"
@technobly
technobly / band-select.cpp
Created April 6, 2016 19:18
Electron Cellular Band Select API Example App
#include "application.h"
SYSTEM_MODE(SEMI_AUTOMATIC);
// ALL_LEVEL, TRACE_LEVEL, DEBUG_LEVEL, INFO_LEVEL, WARN_LEVEL, ERROR_LEVEL, PANIC_LEVEL, NO_LOG_LEVEL
//SerialDebugOutput debugOutput(9600, ALL_LEVEL);
void waitForEnter() {
while (!Serial.available()) {
Particle.process();
@technobly
technobly / electron-wkp.cpp
Created March 26, 2016 23:35
Particle Asset Tracker Wake on Accelerometer bump, sleep after 10 seconds of no motion
// Uncomment for BUILD IDE
// #pragma SPARK_NO_PREPROCESSOR
#include <math.h>
#include "math.h"
#include <ctype.h>
// Particle application functions
#include "application.h"
// If compiling locally, need Adafruit_LIS3DH.cpp/.h and Adafruit_Sensor.h
@technobly
technobly / u260.md
Created March 22, 2016 13:37
Issue 896 U260 Logs (Working)

U260

399.431 AT send      33 "AT+UDNSRN=0,\"www.technobly.com\"\r\n"
   403.502 AT read  +   27 "\r\n+UDNSRN: \"74.208.28.90\"\r\n"
   403.512 AT read OK    6 "\r\nOK\r\n"
0000403543:DEBUG: virtual void TCPClient::stop() (192):_sock -1 closesocket
socketSocket(TCP)
   403.643 AT send      12 "AT+USOCR=6\r\n"
   403.700 AT read  +   13 "\r\n+USOCR: 1\r\n"
@technobly
technobly / g350.md
Last active March 22, 2016 13:38
Issue 896 G350 Logs (Not Working)

G350

 384.847 AT send      33 "AT+UDNSRN=0,\"www.technobly.com\"\r\n"
   386.438 AT read  +   27 "\r\n+UDNSRN: \"74.208.28.90\"\r\n"
   386.448 AT read OK    6 "\r\nOK\r\n"
0000386479:DEBUG: virtual void TCPClient::stop() (192):_sock -1 closesocket
socketSocket(TCP)
   386.579 AT send      12 "AT+USOCR=6\r\n"
   386.666 AT read  +   13 "\r\n+USOCR: 1\r\n"
@technobly
technobly / cell-locate.cpp
Last active October 23, 2018 18:19
Cellular Locate Test Application
/******************************************************************************
Copyright (c) 2015 Particle Industries, Inc. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@technobly
technobly / band-select.cpp
Last active September 8, 2016 07:32
Band Selection on the Particle Electron
// COMPILE from firmware/modules $
// make clean all PLATFORM_ID=10 APPDIR=~/code/fw-apps/band-select COMPILE_LTO=n DEBUG_BUILD=y -s program-dfu
//
// NOTE: APPDIR=~/code/fw-apps/band-select can be APP=band-select if that's easier
/* Includes ------------------------------------------------------------------*/
#include "application.h"
#include "cellular_hal.h"
typedef struct {
#include "application.h"
SYSTEM_MODE(SEMI_AUTOMATIC);
// ALL_LEVEL, TRACE_LEVEL, DEBUG_LEVEL, INFO_LEVEL, WARN_LEVEL, ERROR_LEVEL, PANIC_LEVEL, NO_LOG_LEVEL
Serial1DebugOutput debugOutput(9600, ALL_LEVEL);
unsigned long whenPublished = 0;
retained int publishCount = 0;
@technobly
technobly / police-button.cpp
Last active December 15, 2015 14:17
Particle Internet Button Police Lights
// 1. CREATE A NEW APP at https://build.particle.io
// 2. PASTE THIS CODE IN and SAVE
// 3. GO TO LIBRARIES, OPEN the NEOPIXEL library
// 4. Click INLUCDE IN APP
// 5. SELECT THE APP YOU PASTED/SAVED THIS CODE IN
// 6. Click ADD TO THIS APP
// 7. COMPILE and FLASH to a PARTICLE INTERNET BUTTON
// 8. SHINE IT DOWN ON SOMETHING AND BE AMAZED :)
// 9. WOOP WOOP!!, THAT'S THE SOUND OF THE POLICE!
//