Skip to content

Instantly share code, notes, and snippets.

View dimme's full-sized avatar
🛰️
Beep beep beep

dimme

🛰️
Beep beep beep
View GitHub Profile
import java.io.IOException;
import java.net.SocketException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
/**
* Blocket.se easteregg competition daemon
*
* Features:
* 1. Listening on UDP ports 2600 - 2610 using threads.
#include <LiquidCrystal.h>
#include "LCDKeypad.h"
#define DAYS 0
#define HOURS 1
#define MINUTES 2
#define SECONDS 3
// The LCD screen
LCDKeypad lcd;
/* ATMEL ATMEGA16 POV program made by Dimme.net */
#include "avr/io.h"
#define SPACE 100
#define SHORTLINE 100
#define MIDLINE 300
#define RSPACE 400
void ch(char);
/* ATMEL ATMEGA16 Hand-powered v2 POV program made by Dimme.net */
#include "avr/io.h"
#define SPACE 100
#define SHORTLINE 100
#define SHORTSHORTLINE 50
#define MIDLINE 300
#define RSPACE 400
/* Arduino WebVisitors Blinker by Dimme.net */
int ledPin = 12;
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
<?php exec("echo 1 > /dev/ttyUSB0"); ?>
@dimme
dimme / gist:7223634
Last active December 26, 2015 22:29
#!/bin/bash
set -o nounset
set -o errexit
REPO_URI=${REPO_URI:-"https://github.com/Hexxeh/rpi-firmware"}
UPDATE_SELF=${UPDATE_SELF:-1}
UPDATE_URI="https://gist.github.com/Dimme/7223634/raw/29c43a079ac472cb4f3f4912bbf13abb8649a85c/gistfile1.txt"
#include <SPI.h>
#include <SFE_CC3000.h>
#include "SoftwareSerial.h"
#include <Thermal.h>
// Pins
#define CC3000_INT 2 // Needs to be an interrupt pin (D2/D3)
#define CC3000_EN 7 // Can be any digital pin
#define CC3000_CS 10 // Preferred is pin 10 on Uno
@dimme
dimme / stewie.m
Created March 31, 2015 15:59
Implementation of a Stewart platform in MATLAB
function stewie()
% Copyright Dimitrios Vlastaras
% Distributed under the Attribution-ShareAlike CC BY-SA license
% Side length of the upper frame
a = 10;
% Side lengths of the base frame
b = 15;
d = 1;
@dimme
dimme / MailBuzz.ino
Last active August 29, 2015 14:24
MailBuzz
/****************************************************************/
/* MailBuzz implementation for Arduino by Dimitrios Vlastaras */
/****************************************************************/
#include <SPI.h>
#include <SFE_CC3000.h>
#include <SFE_CC3000_Client.h>
#include "LinkedList.h"
// Pins