Skip to content

Instantly share code, notes, and snippets.

View dilshan's full-sized avatar
🌀
Cyclone is on the way...

Dilshan R Jayakody dilshan

🌀
Cyclone is on the way...
View GitHub Profile
@dilshan
dilshan / wfm_receiver.grc
Last active June 1, 2021 13:25
GNURadio model for FM stereo radio receiver (88.1MHz to 107.9 MHz) using QT GUI widgets.
options:
parameters:
author: Dilshan R Jayakody
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
@dilshan
dilshan / usim-demo-main.c
Created July 5, 2020 00:45
XC8 source code to test on μSim simulator (with Arduino Uno).
#include <xc.h>
#include <stdint.h>
// This is not an accurate frequency. The exact value may depend on the
// specifications of the hosting platform.
#define _XTAL_FREQ 25000
void main(void)
{
uint8_t position = 2;
@dilshan
dilshan / pt8211-dac.ino
Last active June 8, 2023 17:00
PT8211 DAC verification script for Arduino
#include <limits.h>
#ifndef PIN_BCK
#define PIN_BCK 22
#endif
#ifndef PIN_WS
#define PIN_WS 23
#endif
@dilshan
dilshan / usb-external-display-direct-mode.py
Created June 30, 2019 04:46
USB external display direct mode acess
import serial
device = serial.Serial('/dev/ttyACM0')
if device.is_open:
device.write(13)
device.write(str.encode('-360'))
device.close()
@dilshan
dilshan / usb-external-display-low-level.py
Last active June 30, 2019 03:57
USB external display module low level API call
import serial
device = serial.Serial('/dev/ttyACM0')
if device.is_open:
device.write([94, 49, 54, 49, 55, 52, 0, 0, 0, 0, 0, 0])
device.close()
@dilshan
dilshan / dtmf-sample.c
Created May 9, 2019 06:15
Arduino DTMF sample
#include "dtmfgen.h"
DTMFGenerator dtmf;
void setup()
{
}
void loop()