Skip to content

Instantly share code, notes, and snippets.

View jdneo's full-sized avatar

Sheng Chen jdneo

View GitHub Profile
@jdneo
jdneo / timerInterrupt.ino
Created December 8, 2016 02:21
Timer Interrupt example for Adafruit Feather M0. Callback function can be written in TC3_Handler().
#define LED_PIN 13
#define CPU_HZ 48000000
#define TIMER_PRESCALER_DIV 1024
void startTimer(int frequencyHz);
void setTimerFrequency(int frequencyHz);
void TC3_Handler();
bool isLEDOn = false;
@jdneo
jdneo / run xvfb in background
Last active September 10, 2024 10:56
run xvfb background in linux
1 copy the file into /etc/init.d/xvfb
2 chmod +x /etc/init.d/xvfb
3 ./etc/init.d/xvfb start
4 # some headless test here
5 ./etc/init.d/xvfb stop