Skip to content

Instantly share code, notes, and snippets.

slzatz

Block or report user

Report or block slzatz

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
View umqtt_client.py
'''
Based on Paul Sokolovsky's work on micropython mqtt client
Note MicroPython socket module supports file interface directly (read)
'''
import socket
import ustruct as struct
import time
class MQTTClient:
@slzatz
slzatz / umqtt.py
Created Apr 16, 2016
This is an mqtt subscribe client for micropython
View umqtt.py
# Copyright (c) 2012-2014 Roger Light <roger@atchoo.org>
#
# This is a stripped down version of paho.mqtt intended for micropython
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Eclipse Distribution License v1.0 which accompany this distribution.
#
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
# and the Eclipse Distribution License is available at
@slzatz
slzatz / font.py
Last active Jan 2, 2017
I2C driver for micropython esp8266 ssd1306 OLED (ssd1306a.py is paired down and works with the font.py file to allowing generating text)
View font.py
# Originally from https://github.com/guyc/py-gaugette/blob/master/gaugette/font5x8.py
# Contains ASCII 32 (space) through ASCII 90 (Z)
cols = 5
rows = 8
bytes = [
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14,
You can’t perform that action at this time.