Skip to content

Instantly share code, notes, and snippets.

@jedie
jedie / button_test.py
Last active January 31, 2024 05:32
microPython button irq debouncing
import time
from micropython import const
from machine import Pin, Timer
BUTTON_A_PIN = const(32)
BUTTON_B_PIN = const(33)
class Button:
"""
@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active December 1, 2023 21:05
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 06:50
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ufux
ufux / lcdui.py
Created July 27, 2013 14:08
Created a working driver to drive a LCD 20x4 display based on HD44780U (http://www.exp-tech.de/Displays/I2C-LCD-1602-Module-652.html) via PCF8574 i2c bus expander driven from a raspberrypi.
import smbus
import getopt
import sys
from time import *
from time import gmtime, strftime
# TODO: Factor out all device_write calls to some PCF8574 specific module ...
# will be different with another io expander
# communication from expander to display: high nibble first, then low nibble
@daichan4649
daichan4649 / AndroidManifest.xml
Created January 25, 2012 02:40
AsyncTaskTest(API Level under 13 ,over 13)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.asynctask"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="12" />
<application
android:icon="@drawable/ic_launcher"
@shirou
shirou / FileObserver on Android
Created November 2, 2010 02:24
Detect file change using FileObserver on Android
private class PathFileObserver extends FileObserver{
static final String TAG="FILEOBSERVER";
/**
* should be end with File.separator
*/
String rootPath;
static final int mask = (FileObserver.CREATE |
FileObserver.DELETE |
FileObserver.DELETE_SELF |
FileObserver.MODIFY |