Skip to content

Instantly share code, notes, and snippets.

#include <Wire.h>
#include <SPI.h>
#include <SparkFunLSM9DS1.h>
LSM9DS1 imu;
#define LSM9DS1_M 0x1E
#define LSM9DS1_AG 0x6B
static unsigned long lastPrint = 0;
@mnirm
mnirm / WifiHelper.ts
Last active December 30, 2020 22:16
Write Wifi Network to NDEF tag: WifiHelper for writing a payload to your ndef tag.
// Author:Github - @mnirm
export class WifiHelper {
CryptoType: CryptoType = new CryptoType();
AuthType: AuthType = new AuthType();
public CredsToPayload(WifiCredentials: IWiFiCredentials){
let payload = [0x10, 0x0E]; // Credential same for every wifi network
// Network ID
@mnirm
mnirm / toType.ts
Created March 21, 2019 00:20
get type from an object back as string
var toType = function(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}