Skip to content

Instantly share code, notes, and snippets.

Gerad Munsch unforgiven512

Block or report user

Report or block unforgiven512

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
@unforgiven512
unforgiven512 / main.py
Created Jul 18, 2019
old main.py file on MicroPython ESP8266 board #7
View main.py
#
# main.py
#
# Example for MicroPython
#
from machine import Pin, RTC, PWM, Signal, I2C
# from machine import I2C
# from machine import SPI
@unforgiven512
unforgiven512 / boot.py
Created Jul 18, 2019
old boot.py file on MicroPython ESP8266 board #7
View boot.py
# This file is executed on every boot (including wake-boot from deepsleep)
import esp
import gc
import webrepl
import machine
import network
# import socket
# Disable debug output
@unforgiven512
unforgiven512 / boot.py
Created Jul 18, 2019
new boot.py file on MicroPython ESP8266 board #7
View boot.py
# This file is executed on every boot (including wake-boot from deepsleep)
# Import any necessary modules for early in the system boot process
import esp
import gc
import webrepl
import machine
import network
# import socket
import uos
@unforgiven512
unforgiven512 / main.py
Created Jul 18, 2019
new main.py file on MicroPython ESP8266 board #7
View main.py
import network
import utime
import ntptime
import onewire
import ds18x20
import socket
import os
import sys
import esp
import machine
View reset_info.py
import machine
def print_all_reset_causes():
print("\n +------------------------+")
print(" | KNOWN RESET CAUSES |")
print(" +------------------------+\n")
print(" PWRON_RESET: %d" % machine.PWRON_RESET)
print(" WDT_RESET: %d" % machine.WDT_RESET)
print(" SOFT_RESET: %d" % machine.SOFT_RESET)
print(" DEEPSLEEP_RESET: %d" % machine.DEEPSLEEP_RESET)
View ntptime.py
import utime
#import machine
from machine import RTC
try:
import usocket as socket
except:
import socket
try:
import ustruct as struct
View curses_voice_hat.py
#!/usr/bin/env python3
import locale
locale.setlocale(locale.LC_ALL, '')
import curses
from curses import wrapper
import time
import numpy as np
import pigpio
View assistant_library_with_local_commands_demo.py
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
View assistant_library_demo2.py
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
View pigpio_testing.py
import pigpio
pi = pigpio.pi()
if not pi.connected:
exit
else:
print("pigpio is connected")
You can’t perform that action at this time.