Skip to content

Instantly share code, notes, and snippets.

View drewandre's full-sized avatar

Drew André drewandre

View GitHub Profile
// Main code for Master Node RF Reading and GPRS Transmitting //
// Written by Kuan-Sheng Chen and Karim Abdallah. July 26 2017. Save the Date.
//
// v 1.0. Includes RF Reading, data parsing, and trasmitting to AWS database with POST.
// Ain't she a beauty.
// Libraries and inspiration courtesy of Adafruit and various partners.
#include <SPI.h>
#include <RH_RF95.h>
@drewandre
drewandre / apa102
Last active October 17, 2018 02:49
#include <FastLED.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#define NUM_LEDS 300
#define DATA_PIN 7
#define CLOCK_PIN 14
CRGB leds[NUM_LEDS];
@drewandre
drewandre / App.js
Last active January 31, 2020 14:11
export class App extends Component {
constructor(props) {
super(props)
this.BLEManager = new BleManager({
restoreStateIdentifier: 'bleManagerRestoredState',
restoreStateFunction: bleRestoredState => this.handleBLEManagerStateRestoration(bleRestoredState)
})
this.BLEManager.setLogLevel(LogLevel.Verbose)
this.BLEManager.onDeviceDisconnected(() => console.log('hey, device disconnected'))
this.props.actions.saveBLEManager(this.BLEManager)
@drewandre
drewandre / sbCreateUserListQuery.js
Created July 22, 2019 16:15
SendBird user list query
export const sbCreateUserListQuery = userIdsArray => {
const sb = SendBird.getInstance()
let applicationUserListQuery = sb.createApplicationUserListQuery()
applicationUserListQuery.limit = 100
applicationUserListQuery.userIdsFilter = userIdsArray
return applicationUserListQuery
};
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
module.exports = {
@drewandre
drewandre / .eslintrc
Last active October 11, 2019 14:43
ADK Group eslint file for react web and native projects
{
"extends": [
“react-app”,
“@react-native-community”
],
“overrides”: [
"arrow-parens": ["error", "always"] // https://eslint.org/docs/rules/arrow-parens#always
]
}
! function(e, n) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define(n) : (e = e || self).SendBirdSyncManager = n()
}(this, function() {
"use strict";
function d(e) {
return (d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
Processing esp32dev (platform: espressif32; board: esp32dev; framework: espidf)
-----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 1.11.2 > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-espidf 3.30300.190916 (3.3.0)
- tool-esptoolpy 1.20600.0 (2.6.0)
@drewandre
drewandre / main.c
Created March 18, 2020 17:22
FastLED on ESP32-LyraT 4.3
#include "Arduino.h"
#include "FastLED.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_dsp.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
#include <stdbool.h>