Skip to content

Instantly share code, notes, and snippets.

Brett Walach technobly

Block or report user

Report or block technobly

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
@technobly
technobly / steam-machine-kill-switch1.cpp
Created Feb 24, 2019
Steam Machine Kill Switch (Simple Version)
View steam-machine-kill-switch1.cpp
/**
* Steam Machine Kill Switch (Simple Version)
* Brett Walach
* 2019-02-24
*
* A0 is wired directly to the gate of a 2N7002 mosfet
* The source of the 2N7002 is connected to GND
* The drain of the 2N7002 is connected to the Steam Machine's power switch
* Computer GND is connected the Xenon's GND
* Computer +5V from a USB port is connected to the Xenon's Li+
@technobly
technobly / hidapi.md
Last active Jul 17, 2019
OpenOCD "configure: error: hidapi is required for the CMSIS-DAP" HIDAPI_LIBS
View hidapi.md

If you are trying to install OpenOCD with CMSIS-DAP support on Mac OS and having trouble, this Gist may be for you :)

This is the typical error if you specifically try to configure OpenOCD for CMSIS-DAP support

checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for LIBFTDI... no
checking for LIBFTDI... no
@technobly
technobly / electron-ubidots.cpp
Created Jan 6, 2017
Electron Ubidots Example
View electron-ubidots.cpp
// Author: RWB <https://community.particle.io/users/rwb/activity>
SYSTEM_MODE(SEMI_AUTOMATIC);
//SYSTEM_THREAD(ENABLED);
// This #include statement was automatically added by the Particle IDE.
#include "Ubidots/Ubidots.h"
#define TOKEN "token" // Put here your Ubidots TOKEN
#define DATA_SOURCE_NAME "ElectronSleepNew"
//This serial prints system process via USB incase you need to debug any problems you may be having with the system.
@technobly
technobly / electron-low-power-sensor.cpp
Last active May 11, 2018
Electron Low Power Sensor Example (Read a sensor every hour, publish once per day, deep sleep in-between) Raw
View electron-low-power-sensor.cpp
/*
******************************************************************************
* Copyright (c) 2016 Particle Industries, Inc. All rights reserved.
*
* This library 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 library is distributed in the hope that it will be useful,
@technobly
technobly / rssi.cpp
Created Nov 15, 2016
Wi-Fi RSSI test app
View rssi.cpp
#define DEBUG_SERIAL true
#define MEASUREMENT_INTERVAL 10000
uint32_t lastTime = 0;
int i = 0;
void setup() {
if (DEBUG_SERIAL) Serial.begin(9600);
}
void loop() {
View blog-post-archive.md

Hi All, Yesterday I got a FTDI (UART to USB) board from unknown manufacturer. I plugged in to the iMac and without a surprise, it was not working. I have tried all the possible combinations, but no luck. Then after some digging in Apple documentation and Google about kext, FTDI and related, I finally made it. Here are the steps:

  1. In order to disable the AppleUSBFTDI.kext extension (From Mac OS X 10.8 there is Apple driver implementation for the FTDI chip).
cd /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns
sudo mv AppleUSBFTDI.kext AppleUSBFTDI.disabled
View photon-relay-shield-cycler.cpp
int onTime = 30000;
int offTime = 300000;
int cycles = 0;
bool isOn = true;
uint32_t startTime = millis();
int updateOnTime(String command){
onTime = command.toInt();
return onTime;
}
@technobly
technobly / wifi-listen-true.cpp
Created Jul 20, 2016
Manually enter and exit listening mode with the D0 pin
View wifi-listen-true.cpp
// Configure a wifi network with a bogus name or password into the Photon
// Ground D0 to call WiFi.listen(true) while the connection attempt is ongoing
// Open, then Ground D0 again to call WiFi.listen(false)
///
#include "application.h"
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(AUTOMATIC);
void reconnectAfterListen() {
@technobly
technobly / Pomodoro.cpp
Last active Jul 6, 2016
Super simple Pomodoro Timer via the Particle Internet Button!
View Pomodoro.cpp
// This #include statement was automatically added by the Particle IDE.
#include "InternetButton/InternetButton.h"
InternetButton b = InternetButton();
uint32_t workTime = 0;
uint32_t restTime = 0;
// Time definitions in milliseconds
@technobly
technobly / Info.md
Last active May 7, 2019
SMS Test App (with Tinker)
View Info.md
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
You can’t perform that action at this time.