Skip to content

Instantly share code, notes, and snippets.

@brockcraft
brockcraft / Pymakr 2.13
Created May 5, 2021 16:25
Installing “pymakr@2.1.13” failed. Hide output…
Installing “pymakr@2.1.13” failed.Hide output…
> @serialport/bindings@8.0.8 install /private/var/folders/r_/chwzt1013xb_hmp9jkmvvbbm0000gn/T/apm-install-dir-202145-27991-14x2ish.t71vk/node_modules/pymakr/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
@brockcraft
brockcraft / gist:cc08cd90be753a2b696f50490fcf55d5
Created May 4, 2021 04:12
Pymakr 2.12.2 install fail log
Installing “pymakr@2.1.12” failed.Hide output…
> @serialport/bindings@8.0.8 install /private/var/folders/r_/chwzt1013xb_hmp9jkmvvbbm0000gn/T/apm-install-dir-202143-11588-4txipe.r3ytt/node_modules/pymakr/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
@brockcraft
brockcraft / lab-2-1-loading-filtering.ipynb
Created September 17, 2020 00:44 — forked from mdrouhard/lab-2-1-loading-filtering.ipynb
Lab 2.1 - Loading & Filtering
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*A sketch to get the ESP8266 on the network and connect to a service via HTTP to
get our external IP address with JSON. This sketch requires <ArduinoJson.h> available
from Sketch -> Include Library -> Manage Library.
For readability we have created a new function, getIP() and consolidated/removed some code.
jeg 2017
added filepath and build time info
brc 2019
refactored code for ArduinoJSON version 6
/*
Code to demonstrate sending a signal from an Adafruit Feather
using a button to detect user input.
If the button is pressed, an alternating HIGH and LOW signal
is sent out over the xmitPin every 250ms and the onboard
LED flashes.
B. Craft 11.28.18
*/
/*
Code to demonstrate receiving a signal from an Adafruit Feather.
B. Craft 11.13.18
*/
const int ledPin = 13;
const int recvPin = 3;
void setup() {
/*
Code to demonstrate sending a signal from an Adafruit Feather.
B. Craft 11.13.18
*/
const int ledPin=13;
const int xmitPin=3;
// the setup function runs once when you press reset or power the board
#include <ESP8266WiFi.h> //Requisite Libraries . . .
#include "Wire.h" //
#include <PubSubClient.h> //
#include <ArduinoJson.h> //
//#define wifi_ssid "hitlab" //You have seen this before
//#define wifi_password "" //
#define wifi_ssid ". . . ." //You have seen this before
#define wifi_password ". . . ." //
#include <ESP8266WiFi.h> //For WiFi connectivity
#include "Wire.h" //For enabling i2c
#include <PubSubClient.h> //For traversing the MQTT server
#include <ArduinoJson.h> //For parsing/reading our JSON strings
#include <Servo.h> //For driving our servo
#include <gfxfont.h> //For the OLED display
#include <Adafruit_GFX.h> //For the OLED display
#include <Adafruit_SSD1306.h> //For the OLED display
//#define wifi_ssid "University of Washington" //You have seen this before
#include "Wire.h"
#include <LiquidTWI.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
#define wifi_ssid ""
#define wifi_password ""
#define mqtt_server "* * * * * *"
#define mqtt_user "* * * * * *" //your user name should be unique (this was provided in class)