Skip to content

Instantly share code, notes, and snippets.

View wdevore's full-sized avatar
💭
I am currently working on the next phase of my neuron simulator in Golang

William Cleveland wdevore

💭
I am currently working on the next phase of my neuron simulator in Golang
View GitHub Profile
@wdevore
wdevore / async_keyboard.go
Created March 25, 2023 19:45
Go Aysnc Keyboard input via goroutine
package main
import (
"bufio"
"fmt"
"os"
"time"
)
var x int
@wdevore
wdevore / read_pybadge.cpp
Created May 26, 2020 21:46
Pybadge reading pixels
/* PyBadge/PyGamer Display Read - see http://www.technoblogy.com/show?332T
David Johnson-Davies - www.technoblogy.com - v2 21st April 2020
For Adafruit PyBadge/PyGamer ST7735 TFT displays
CC BY 4.0
Licensed under a Creative Commons Attribution 4.0 International license:
http://creativecommons.org/licenses/by/4.0/
*/
@wdevore
wdevore / pybadge.cpp
Created May 26, 2020 21:43
Sprites on the pybadge
/* PyGamer/PyBadge Sprite Routines - see http://www.technoblogy.com/show?33W0
David Johnson-Davies - www.technoblogy.com - 1st May 2020
For Adafruit PyGamer/PyBadge ST7735 TFT displays
CC BY 4.0
Licensed under a Creative Commons Attribution 4.0 International license:
http://creativecommons.org/licenses/by/4.0/
*/
@wdevore
wdevore / stack.rs
Created April 11, 2020 21:49
Simple Rust stack using Copy and Clone
#[derive(Debug, Copy, Clone)]
pub struct Thing {
value: f64,
}
struct Node {
val: Thing,
next: Option<Box<Node>>,
}
@wdevore
wdevore / feather-M4-adc.ino
Created February 24, 2020 13:52
Arduino Adafruit Feather-M4 ADC example
int sensorPin = A2; // select the input pin for the potentiometer
const uint8_t D12 = 12;
const uint8_t D11 = 11;
const uint8_t D10 = 10;
const uint8_t D9 = 9;
const uint8_t D6 = 6;
const uint8_t D5 = 5;
const uint8_t D21 = 21;
const uint8_t D22 = 22;
@wdevore
wdevore / MemoryCycleSeq.ino
Created November 2, 2019 15:30
A simple Arduino sketch for the TTGO T-Display.
/*
Sketch for TTGO T-Display:
This sketch generates signals on 2 or 3 pins according the memory cycle specs
of the FM1808 NVRam chip from RamTron (now "Cypress Semi")
Read cycle: |----- 2us ----------|
/CE _____/''''''''\____________________/''''''''\________
ADR xxxxxxx0101010101010xxxxxxxxxxxxxxxxxxx
/OE ''''''''''''''''''\______________________/'''''''''''
@wdevore
wdevore / comparator.v
Created October 5, 2019 16:40
Simple counter used for learning test bench features and workflow
// A simple comparator used for learning simulation workflows
// comparator - comparator_tb.v
//
// Description:
// Testbench for comparator module.
//
`timescale 1ns/10ps
module comparator #(
@wdevore
wdevore / rotary_bcd.v
Last active October 2, 2019 20:26
Simple BCD Counter using a Rotary Encoder and using IceStorm toolchain while targeted at TinyFPGA-B2
// Rotary Encoder driving a 2 digit 7 Segmented display - top.v
// The BCD decoder is Async.
// The display is a 2281AS which has 2 digits and 2 decimal points
// Pinout:
// 9 = digit 1 common cathode
// 6 = digit 2 common cathode
// 7 = A segment
// 8 = B segment
// 3 = C segment
@wdevore
wdevore / rotary_bargraph.v
Created September 30, 2019 18:38
Simple BarGraph using a Rotary Encoder and using IceStorm toolchain while targeted at TinyFPGA-B2
// Rotary Encoder test - top.v
//
// --------------------------------------------------------------------------
// Sync switch debouncer
// --------------------------------------------------------------------------
module digital_filter(
input clk,
input D,
output reg Q);
@wdevore
wdevore / rotary_binary_counter.v
Created September 30, 2019 18:30
Simple binary counter using a Rotary Encoder and using IceStorm toolchain while targeted at TinyFPGA-B2
// Rotary Encoder test - top.v
//
// --------------------------------------------------------------------------
// Sync switch debouncer
// --------------------------------------------------------------------------
module digital_filter(
input clk,
input D,
output reg Q);