Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#for Denarius cryptocurrency - denarius.io, just change denariusd to your favorite coin daemon
#change all denariusd to denarius.daemon for snap daemon use
#bitcointalk thread - https://bitcointalk.org/index.php?topic=5238747
#create rawa.txt with txid and vouts for all inputs, then remove all extra spaces and newlines to rawb.txt
#rawa.txt put txid and vout
#rawb.txt remove extra space and put createtransaction begin text
#rawc.txt remove last comma and add rest of rawtx info creating the full raw transaction line
#
#txfee - fee you want to use
@biokys
biokys / radar_client.pde
Last active May 17, 2020 04:40
Sources for ultrasonic range radar
import processing.serial.*;
int SIDE_LENGTH = 1000;
int ANGLE_BOUNDS = 80;
int ANGLE_STEP = 2;
int HISTORY_SIZE = 10;
int POINTS_HISTORY_SIZE = 500;
int MAX_DISTANCE = 100;
int angle;
@remcoder
remcoder / game of life with 8x8 bicolor led matrix
Last active September 23, 2016 12:02
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infin…
/*
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infinite grid but on this wrapping 8x8 grid it does ;-)
FYI, the LED matrix is a bicolor one (green/red) and has an I2C interface (http://www.adafruit.com/products/902). I'm using the colors as follows:
- newly created cells are green
- cells that are at least 10 generations old are red
- other living cells are yellow (simultaneously green+red)
It's hookup up to my Arduino Uno r3.
@JChristensen
JChristensen / AVR Sleep
Last active March 31, 2024 18:42
AVR microcontroller sleep demonstrations
Simple demonstrations of putting AVR microcontrollers to sleep in power-down mode,
which results in minimum current. Coded with Arduino IDE version 1.0.4 (and with
the Arduino-Tiny core for the ATtiny MCUs, http://code.google.com/p/arduino-tiny/)
For ATmega328P, ~0.1µA.
For ATtinyX5 revisions that implement software BOD disable, ~0.1µA,
for ATtinyX5 revisions that don't, ~20µA.
@adamzaninovich
adamzaninovich / QuadEncoder.cpp
Created September 25, 2012 18:33
Code used on demo project shown at (http://www.youtube.com/watch?v=a1M5kirA2_8) and (http://www.youtube.com/watch?v=epJ3aSzrsXQ) Includes climate sensing, logging to SD card, HTTP server with JSON output, LCD display with settings menus.
/**
* QuadEncoder.cpp - Library for reading moves from a quadrature rotary encoder
* Created by Pedro Rodrigues (medecau@gmail.com) 9, January of 2010
* Released into the public domain.
*/
#include "Arduino.h"
#include "QuadEncoder.h"
QuadEncoder::QuadEncoder(int pin1, int pin2)