This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Begin delaying | |
LDI ZH,0xFF ;Set high byte | |
LDI ZL,0xFF ;Set low byte | |
DelayLoop: | |
SBIW ZL,1 ;subtract one from word | |
BRNE DelayLoop ;Branch back to DelayLoop unless zero flag was set | |
;Go on with the rest of life |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AVR ATmega168 Analog Comparator Demonstration | |
by Mike Szczys | |
I'm using a voltage divider with a photoresistor on | |
PC6 and a voltage divider with equal values on PC7 | |
to yield a 2.5V reference signal. | |
The analog comparator is set to throw an interrupt | |
whenever there is a zero crossing. I then check the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#split vcf files | |
working_dir = '/home/mike/compile/' | |
input_file = 'final.vcf' | |
output_seed = 'contacts-part-' | |
vcards_per_file = 75 | |
with open(working_dir + input_file,'r') as f: | |
count = 0 | |
output_count = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#define F_CPU 1000000 | |
void init_IO(void) { | |
DDRD |= (1<<PD0) | (1<<PD1) | (1<<PD2); | |
PORTD |= (1<<PD0) | (1<<PD1) | (1<<PD2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git src/stlink-common.c src/stlink-common.c | |
index 08bd0bb..1e3c480 100644 | |
--- src/stlink-common.c | |
+++ src/stlink-common.c | |
@@ -48,6 +48,38 @@ | |
#define FLASH_CR_STRT 6 | |
#define FLASH_CR_LOCK 7 | |
+/************************** | |
+ Begin stm32f05x flash controller defines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namesFile = '/home/mike/Desktop/hgttg.txt' | |
easyPass = 'ilovehackaday' | |
hardCount = 10 | |
import random | |
import string | |
complexityLimit = 3 | |
with open(namesFile, 'r') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cinnamon)mike@localhost:~$ cat /var/log/Xorg.1.log | |
[ 3456.659] | |
X.Org X Server 1.15.1 | |
Release Date: 2014-04-13 | |
[ 3456.659] X Protocol Version 11, Revision 0 | |
[ 3456.660] Build Operating System: Linux 3.2.0-61-generic x86_64 Ubuntu | |
[ 3456.660] Current Operating System: Linux localhost 3.4.0 #1 SMP Thu Aug 7 12:45:28 PDT 2014 x86_64 | |
[ 3456.660] Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-1 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="2 vboot none ro 1,0 2545920 bootcache PARTUUID=65d66091-d5a9-1e4b-8371-d0f34c140f4d/PARTNROFF=1 2545920 2d5664ebe1cccbf3fba4354ef0527586a7e4b18d 512 20000 100000, vroot none ro 1,0 2506752 verity payload=254:0 hashtree=254:0 hashstart=2506752 alg=sha1 root_hexdigest=dce2a9eb47021759c5b0cd4d2d19fbb3a9a01e20 salt=13bc2b92aca86cc26dd125d4a897540d8b4e4fffa7d2f86beb5ab30e336467e9" noinitrd vt.global_cursor_default=0 kern_guid=65d66091-d5a9-1e4b-8371-d0f34c140f4d add_efi_m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APPLICATION="${0##*/}" | |
USAGE="$APPLICATION [options] | |
Wraps enter-chroot to start a Mint session. | |
By default, it will log into the primary user on the first chroot found. | |
Options are directly passed to enter-chroot; run enter-chroot to list them." | |
exec sh -e "`dirname "$0"`/enter-chroot" "$@" startx /bin/bash cinnamon-session-cinnamon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
BeanHid.enable(); | |
// Serial port is initialized automatically; we don't have to do anything | |
} | |
void loop() { | |
AccelerationReading accel = Bean.getAcceleration(); | |
int16_t x = accel.xAxis; | |
int16_t y = accel.yAxis; | |
int16_t z = accel.zAxis; | |
// Add a deadzone. If Bean is reasonabally flat, don't move the mouse pointer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using ESP32 HSPI (SPI2) | |
// CS is SS --> | |
// WR is SCK --> | |
// DATA is MOSI --> | |
#define SO 12 | |
#define SI 13 | |
#define SCLK 14 | |
#define SS 15 |
OlderNewer