Skip to content

Instantly share code, notes, and snippets.

View Dan-in-CA's full-sized avatar

Dan Dan-in-CA

  • Northern California
View GitHub Profile
@Dan-in-CA
Dan-in-CA / pigpio_ultrasonic.py
Last active February 18, 2024 10:09
pigpio code for wateproof ultrasonic sensor
#!/usr/bin/python
# By Dan-in-CA 11/2018
# Updated 3/21/2019
from __future__ import print_function, division
from time import sleep
import pigpio
pi = pigpio.pi()
@Dan-in-CA
Dan-in-CA / gpio_pins.py
Created April 15, 2016 22:58
Alternate gpio_pins.py for use with the MCP23017 i2c shift register. Thanks to Jerry Beech
# !/usr/bin/python
# -*- coding: utf-8 -*-
import gv
try:
import RPi.GPIO as GPIO
gv.platform = 'pi'
rev = GPIO.RPI_REVISION
if rev == 1:
@Dan-in-CA
Dan-in-CA / textFields.html
Last active March 26, 2019 19:59
Text entry fields for SIP UI page
<table class="optionList">
<!--Text fields-->
<thead>
<th class="stationNumber">$_('Heading')</th> <!--Edit: Optional-->
<th class="stationNumber">$_('Heading')</th> <!--Edit: Optional-->
</thead>
<tr>
<td style='text-transform: none;'>$_('Text Field 1'):</td> <!--Edit-->
@Dan-in-CA
Dan-in-CA / checkBoxes.html
Last active March 8, 2017 17:17
Check Boxes for SIP plugin UI page
<table class="optionList">
<!--Check boxes-->
<thead>
<th class="stationNumber">$_('Heading')</th> <!--Edit: Optional-->
<th class="stationNumber">$_('Heading')</th> <!--Edit: Optional-->
</thead>
<tr>
<td style='text-transform: none;'>$_('Check Box 1'):</td> <!--Edit-->
<td><input type="checkbox" name="check-1" ${"checked" if 'check-1' in settings else ""}></td>