Researched by Robert Quattlebaum [email protected].
Last updated 2020-02-03.
This file contains hidden or 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
| /* ATTiny LED Twinkler | |
| * | |
| * This is come code I wrote a while back to "twinkle" | |
| * four GPIO outputs that would drive LEDs. It was designed | |
| * to be run on an eight-pin ATTiny13 chip. It works | |
| * quite well, even considering how inefficient it is. | |
| * | |
| * - Robert Quattlebaum, 2012 | |
| */ |
This file contains hidden or 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
| /// Demonstration of a way to do polymorphic property lookup of standardized | |
| /// collections of properties via simple traits and getter methods. This | |
| /// approach could be extended to do things like fetch a list of the supported | |
| /// keys, or expose aritrary traits via a property interface. | |
| /// This is the trait that will be our general-purpose property interface. It | |
| /// is intended to be used as a trait object. | |
| /// | |
| /// This trait is implemented automatically by the `impl_super_trait!` macro, |
This file contains hidden or 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
| /// Demonstration of compile-time key-value type safety. | |
| /// | |
| /// This program demonstrates how you use Rust generics to encode type | |
| /// information into the keys for a key-value store. This allows for | |
| /// type-safe access to data in the store, preventing things like writing | |
| /// strings to keys that should only contain integers. Attempting to | |
| /// do so results in a compile-time error. | |
| /// | |
| /// The example code is at the top of this file, the implementation details | |
| /// are below the example. |
This file contains hidden or 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
| use futures::prelude::*; | |
| use pin_utils::unsafe_pinned; | |
| use std::ops::Deref; | |
| use std::pin::Pin; | |
| use std::sync::Arc; | |
| /// A container for a single object with lifetime that is bound to that of an `Arc`. | |
| /// This is useful for passing around boxed futures that have a lifetime that is limited | |
| /// to that of the object that created it. | |
| /// |
Curve25519: A well-known Montgomery curve designed for ECC at a 128-bit security level.
X25519: The name of the scalar-point multiplication function for points on Curve25519 when performing ECDH. It is also commonly used as a shorthand for ECDH-using-Curve25519.
EdDSA:
This file contains hidden or 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
| #!/bin/sh | |
| GP=${GP-java -jar gp.jar} | |
| set -v | |
| set -e | |
| # This is for the ACR122U to put it into | |
| # a nice state where it won't time out on us. | |
| $GP -d -v -a ff0041ff00 -a ff00520000 || true |
"Extracting the fundamental frequency from a time-domain signal" is basically a long-winded way of saying "demodulating the baseband signal from FM-encoded signal". Well, that's still long winded, but I digress.
In an FM radio, the contraption that accomplishes this task is referred to as a "discriminator". So the task here is to implement a software-based frequency discriminator. There are a few different ways
This file contains hidden or 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
| # REPL Prompt over TCP socket. | |
| # Use `$ telnet <ip-addr>` to connect. | |
| import network | |
| import os | |
| import socket | |
| import sys | |
| listen_s = None | |
| client_s = None |


