Skip to content

Instantly share code, notes, and snippets.

#include <stdint.h>
#define NULL 0
//#define LED (*(volatile uint32_t*)0x02000000)
#define LED (*(volatile uint32_t*)0x03000000)
#define reg_uart_clkdiv (*(volatile uint32_t*)0x02000004)
#define reg_uart_data (*(volatile uint32_t*)0x02000008)
@drtrigon
drtrigon / log
Last active July 27, 2018 17:30
OWPJON - Local bus going through walls / outdoors - https://github.com/gioblu/PJON/issues/222
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
owp:ws:v1
5.051000118255615, HEX: 0xCB 0xA1 0xA1 0x40
96095.921875, HEX: 0xF6 0xAF 0xBB 0x47
6120.0, HEX: 0x00 0x40 0xBF 0x45
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
//This Modifed version of VUSB was created in part by Rickey Ward, the USB HID descriptor
//was designed to be generic and useful, feel free to use this code to develop cool
//arduino based gamepads!
#include "HIDJoy.h"
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/interrupt.h> /* for sei() */
#include <util/delay.h> /* for _delay_ms() */
@drtrigon
drtrigon / externals-init.py
Created June 26, 2016 09:59
The Hitchhiker’s Guide to Packaged Code!
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Externals modules automatic setup checker and installer for various OS.
"""
#
# (C) DrTrigon, 2013
# (C) Pywikipedia team, 2013
#