Skip to content

Instantly share code, notes, and snippets.

View tekk's full-sized avatar
💭
Just finished my EMA TTS REPORTER for HAM radio METAR annoucements

Peter Javorsky tekk

💭
Just finished my EMA TTS REPORTER for HAM radio METAR annoucements
View GitHub Profile
@tekk
tekk / PWM_MiesanieFarieb_Marek.ino
Created July 15, 2014 05:01
PWM_ColorMixing_RGB_LED_CommonAnode
#include <FlexiTimer2.h>
#define GREEN 9
#define RED 6
#define BLUE 5
int redPin = RED;
int greenPin = GREEN;
int bluePin = BLUE;
@tekk
tekk / IRMood.ino
Created July 15, 2014 13:30
IRMood
#include <IRremote.h>
int RECV_PIN = A0;
IRrecv irrecv(RECV_PIN);
decode_results results;
boolean red, green, blue, on;
void setup()
@tekk
tekk / gist:7483ad2711ef822b1ff8
Created July 21, 2014 17:49
Elegant bubblesort, source: Arduino forums
void bsort(int *a, int n)
{
for (int i = 1; i < n; ++i)
{
int j = a[i];
int k;
for (k = i - 1; (k >= 0) && (j < a[k]); k--)
{
a[k + 1] = a[k];
}
@tekk
tekk / nokia3310display.ino
Created July 22, 2014 19:35
Nokia 3310 display
/*
This Code has extra features
including a XY positioning function on Display
and a Line Draw function on Nokia 3310 LCD
It is modded from the original
http://playground.arduino.cc/Code/PCD8544
*/
// Mods by Jim Park
// jim(^dOt^)buzz(^aT^)gmail(^dOt^)com
// hope it works for you
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
@tekk
tekk / gist:65ab3397a9d06d05c98068847ffa0b8a
Created October 18, 2016 20:44
Vypocet vzdialenosti a azimutu medzi dvoma lokatormi - JavaScript
<div id="lokator">
<span lang="sk"><form lpformnum="1">
<p align="center">Tvoj lokátor
<input maxlength="6" name="lokators" value="JN98NT" size="7" style="text-align: center; border: 1px solid #aaa;">
<span style="margin-left:1em;">Lokátor protistanice</span>
<input maxlength="6" name="lokatort" value="JN98CD" size="7" style="text-align: center; border: 1px solid #aaa;"><span lang="sk">
<input onclick="vypocet(this.form);" type="button" value="Výpočítaj" style="margin-left:1em;">
<span style="margin-left:2em; font-weight: bold;">Vzdialenosť
<input name="vzdalenost" value="" size="5" style="text-align: center; border: 1px solid #aaa; font-weight:bold;">
km</span>
void setup()
{
Serial.begin(115200);
}
void loop()
{
static unsigned long x = 0;
if (x++ % 100 == 0)
@tekk
tekk / serial_tekk.py
Created April 23, 2018 03:04
Serial list ports in Python - serial_ports()
import sys
import glob
import serial
def serial_ports():
""" Lists serial port names
:raises EnvironmentError:
On unsupported or unknown platforms
@tekk
tekk / ring.ino
Last active January 8, 2019 20:56
Neopixel Ring Wemos D1 Mini
#include <Adafruit_NeoPixel.h>
#define PIN D7
#define STRIPSIZE 16
Adafruit_NeoPixel strip = Adafruit_NeoPixel(STRIPSIZE, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.setBrightness(25); // Lower brightness and save eyeballs!