Skip to content

Instantly share code, notes, and snippets.

View smukkejohan's full-sized avatar

Johan Bichel Lindegaard smukkejohan

View GitHub Profile
#include <wiringPi.h>
#include <wiringPiSPI.h>
#include <iostream>
#include <stdint.h>
int main() {
wiringPiSetup();
if(wiringPiSPISetup(0, 6000000) < 0) {
std::cerr << "wiringPiSPISetup failed" << std::endl;
}
@smukkejohan
smukkejohan / fishflocking.pde
Last active August 29, 2015 13:56 — forked from brysonian/index.html
Example of Flocking - Illutron - Nikola Lenivets
/**
* Flocking
* by Daniel Shiffman.
*
* An implementation of Craig Reynold's Boids program to simulate
* the flocking behavior of birds. Each boid steers itself based on
* rules of avoidance, alignment, and coherence.
*
* Click the mouse to add a new boid.
*/
@smukkejohan
smukkejohan / README.md
Last active August 29, 2015 13:56 — forked from mbostock/.block

Example of flocking

#include "ofMain.h"
#include "ofAppGlutWindow.h"
class testApp : public ofBaseApp {
public:
ofImage img;
ofPoint corners[4];
int selectedCorner;