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
// Demo video: https://www.youtube.com/watch?v=mbqrDqTsEf0 | |
#include <Audio.h> | |
AudioInputAnalog audioIn; | |
AudioAnalyzeToneDetect row1; // 7 tone detectors are needed | |
AudioAnalyzeToneDetect row2; // to receive DTMF dial tones | |
AudioAnalyzeToneDetect row3; | |
AudioAnalyzeToneDetect row4; | |
AudioAnalyzeToneDetect column1; |
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
// Test whether seek() works after reading to end of file | |
// | |
// https://twitter.com/fast_code_r_us/status/1285180217720528896 | |
#include <SD.h> | |
const int csPin = 10; | |
void setup() { | |
Serial.begin(9600); |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/select.h> | |
#include <unistd.h> | |
#include <errno.h> |
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
// TwitchyBun algorithm, Dec 4 2019 | |
// https://www.twitch.tv/ninjabunny9000 | |
// gcc -Wall -o TwitchyBun TwitchyBun.c && ./TwitchyBun | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
// A very quick entropy test. Run on Teensy 3.x or Teensy LC. | |
// https://twitter.com/DavidInOregon/status/937304504210423808 | |
volatile uint8_t val=0; | |
volatile bool newval=false; | |
void setup() { | |
SIM_SCGC5 |= SIM_SCGC5_LPTIMER; | |
LPTMR0_CSR = 0b10000100; | |
LPTMR0_PSR = 0b00000101; // PCS=01 : 1 kHz clock |