Skip to content

Instantly share code, notes, and snippets.

View jonathanbarton's full-sized avatar

Jonathan Barton jonathanbarton

View GitHub Profile
@jonathanbarton
jonathanbarton / esp8266_intro.md
Last active March 28, 2024 19:50
ESP8266 Introduction

#Overview

The ESP8266 is a versatile chipset that provides client and access point wifi capabilities, on-chip SRAM and flash storage, a RISC processor, GPIO pins, and pin outs for memory and CPU extensability. Bundled as a series of modules with varying features focused around acting as either a wifi extension module to an existing microcontroller or as an self-contained solution for integrating wifi and internet functionality with GPIO control. From an application standpoint, the ESP weighs in as an inexpensive and compact alternative to AVR (arduino) based, wifi-driven IoT solutions.

Chip Layout

AT Command Set

AT+RST restart the module, received some strange data, and "ready"

@jonathanbarton
jonathanbarton / simple_programming_problems
Last active June 5, 2021 11:21
simple_programming_problems
Elementary
Write a program that prints ‘Hello World’ to the screen.
Write a program that asks the user for her name and greets her with her name.
Modify the previous program such that only the users Alice and Bob are greeted with their names.
Write a program that asks the user for a number n and prints the sum of the numbers 1 to n
Modify the previous program such that only multiples of three or five are considered in the sum, e.g. 3, 5, 6, 9, 10, 12, 15 for n=17
Write a program that asks the user for a number n and gives him the possibility to choose between computing the sum and computing the product of 1,…,n.
Write a program that prints a multiplication table for numbers up to 12.
Write a program that prints all prime numbers. (Note: if your programming language does not support arbitrary size numbers, printing all primes up to the largest number you can easily represent is fine too.)
@jonathanbarton
jonathanbarton / pizerochromiumkiosk.md
Last active March 25, 2019 18:22
Pi Zero (Jessie/Stretch) Chromium Kiosk Mode
@jonathanbarton
jonathanbarton / swagger.json
Created February 15, 2018 22:18
swagger.json
{"swagger":"2.0","info":{"title":"Course Maps API","description":"API for interacting with Engrade Course Maps","contact":{"name":"Isaac Riceweber","email":"isaac.riceweber@engrade.com"},"version":"v1"},"host":"core-api-c2qastg.lms.nonprod.mheducation.com","basePath":"\/coursemaps\/v1","schemes":["https"],"consumes":["application\/json"],"produces":["application\/json"],"paths":{"\/folders\/{folderid}\/children\/{itemid}\/assignment":{"post":{"tags":["folders"],"description":"Creates an assignment for an item and creates a mapping between the item and assignment","operationId":"assignFolderItem","parameters":[{"name":"folderid","in":"path","description":"Identifier for the folder requested.","required":true,"type":"integer","minimum":1},{"name":"itemid","in":"path","description":"Identifier for the item that will be assigned","required":true,"type":"integer","minimum":1},{"$ref":"#\/parameters\/ContextType"},{"$ref":"#\/parameters\/ContextId"},{"name":"payload","in":"body","description":"Structure for JSON re
@jonathanbarton
jonathanbarton / pycitylookup.py
Created February 6, 2018 14:23
python city lookup
import json
import urllib, urllib2, hashlib
class DataAccessLayer(object):
def __init__(self):
self.cache = None
def __load__(self, file_path):
path_hash = hashlib.md5(file_path).hexdigest()[:7]
file_name = '{}.json'.format(path_hash)
urllib.urlretrieve(file_path, file_name)
@jonathanbarton
jonathanbarton / coursemap.json
Created November 17, 2017 15:38
coursemap.json
{"swagger":"2.0","info":{"title":"Course Maps API","description":"API for interacting with Engrade Course Maps","contact":{"name":"Isaac Riceweber","email":"isaac.riceweber@engrade.com"},"version":"v1"},"host":"core-api-c2qastg.lms.nonprod.mheducation.com","basePath":"\/coursemaps\/v1","schemes":["https"],"consumes":["application\/json"],"produces":["application\/json"],"paths":{"\/folders\/{folderid}\/children\/{itemid}\/assignment":{"post":{"tags":["folders"],"description":"Creates an assignment for an item and creates a mapping between the item and assignment","operationId":"assignFolderItem","parameters":[{"name":"folderid","in":"path","description":"Identifier for the folder requested.","required":true,"type":"integer","minimum":1},{"name":"itemid","in":"path","description":"Identifier for the item that will be assigned","required":true,"type":"integer","minimum":1},{"$ref":"#\/parameters\/ContextType"},{"$ref":"#\/parameters\/ContextId"},{"name":"payload","in":"body","description":"Structure for JSON re
@jonathanbarton
jonathanbarton / swagger.yml
Created October 11, 2017 17:55
swagger.yml
swagger: '2.0'
info:
title: Assess Authoring Service API (implemented)
description: The current development state of the Assess Authoring Service API
version: "0.0.1"
schemes:
- https
basePath: /v1
produces:
- application/json
@jonathanbarton
jonathanbarton / rpi_format_imaging_steps.md
Last active October 3, 2017 15:20
Steps for Cloning / Formatting / Imaging SD Card for Raspberry Pi: OSX

Optional: Displaying Copy Progress

Optionally, you can install pv command to display inline cli progress bars for dd command.

brew install pv

Insert SD and Identify