Skip to content

Instantly share code, notes, and snippets.

View Happsson's full-sized avatar

Hannes Paulsson Happsson

View GitHub Profile
public static class LED_STATIC_TABLE{
public static int[] BLACK = {0,0,0};
public static int[] RED = {255, 0 ,0 };
public static int[] BLUE = {0,0,255};
public static int[] GREEN = {0,255,0};
public static int[] YELLOW = {255, 255, 0};
@Happsson
Happsson / gist:e0148dcbe355edb1e5d24df88f553df1
Last active November 8, 2016 23:12
IS31fl3731 processing.org driver
import processing.io.*;
byte addr = 0x74;
I2C i2c;
byte ISSI_ADDR_DEFAULT = 0x74;
byte ISSI_REG_CONFIG = 0x00;
byte ISSI_REG_CONFIG_PICTUREMODE = 0x00;
byte ISSI_REG_CONFIG_AUTOPLAYMODE = 0x08;
/**
*
* @Author: Hannes Paulsson, Mikael André
*
* STM32F303
* RX-> PD8
* TX-> PD9
* Baud 9600 (standard)
@Happsson
Happsson / pwmin.c
Created December 11, 2015 11:24
pwn in redo
/*
Interrupt handle and task for PWM-in.
@Author: Hannes Paulsson, Ramon Rodriguez
Channels on controller:
1 : Roll
2 : Thrust
3 : Pitch
4 : Yaw
@Happsson
Happsson / pwm.c
Created December 11, 2015 08:02
pwm-in
/*
Interrupt handle and task for PWM-in.
@Author: Hannes Paulsson, Ramon Rodriguez
Channels on controller:
1 : Roll
2 : Thrust
3 : Pitch
4 : Yaw
@Happsson
Happsson / analyze.java
Created December 10, 2015 08:10
Analyzer processing
/**
* STM32F303
* RX-> PD8
* TX-> PD9
* Baud 9600 (standard)
* 0.1
*/
@Happsson
Happsson / gist:6826d761a7a7744b5ac9
Created December 8, 2015 07:33
Kalman filter quadcopter
/**
* STM32F303
* RX-> PD8
* TX-> PD9
* Baud 9600 (standard)
* 0.1
*/
/*
* snake.ino
*
* A simple snake game.
* When a player hits the wall or the tail of the snake, the score flashes on the screen.
*
* This code is written for use with a 8x8 led matrix, controlled by a MAX7219
*
* Remember to download and include LedControlMS from
#include "LedControlMS.h"
#include <math.h>
#include <stdlib.h>
#include <stdbool.h>
#define NBR_MTX 2
LedControl lc=LedControl(12,11,10, NBR_MTX);
#include "LedControlMS.h"
#include <math.h>
#include <stdlib.h>
#include <stdbool.h>
#define NBR_MTX 2
LedControl lc=LedControl(12,11,10, NBR_MTX);
int speed = 100;