This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <EthernetUdp.h> | |
EthernetUDP udp; | |
void setup() { | |
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0F, 0x36, 0x7D }; //MAC address of Arduino Ethernet | |
IPAddress ip(192, 168, 2, 177); //static IP-address of Arduino Ethernet | |
Ethernet.begin(mac,ip); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//by Rick Companje | |
//based on Greg Borenstein's https://github.com/atduskgreg/Processing-Convex-Hull | |
#include "ofMain.h" | |
bool lexicalComparison(const ofPoint& v1, const ofPoint& v2) { | |
if (v1.x > v2.x) return true; | |
else if (v1.x < v2.x) return false; | |
else if (v1.y > v2.y) return true; | |
else return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
IPAddress ip(192,168,2, 177); | |
IPAddress gateway(192,168, 2, 100); | |
IPAddress subnet(255, 255, 255, 0); | |
EthernetServer server(23); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code Segment para public 'code' | |
assume cs:code,ds:code,es:code | |
locals ; remove if you want to assemble | |
jumps ; with Masm | |
.386 | |
org 100h | |
YES equ 1 | |
NO equ 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var socket = require('socket.io') | |
var express = require('express') | |
var app = express(); | |
var http = require('http').Server(app); | |
var io = require('socket.io')(http); | |
var printer = { | |
id: 0, | |
name: "Ultimaker-F1A23B" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp { | |
public: | |
ofImage earth; | |
ofQuaternion qTo; | |
float angle; | |
ofVec3f axis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var os=require('os'); | |
var net=require('net'); | |
var Gpio = require("onoff").Gpio; | |
var networkInterfaces=os.networkInterfaces(); | |
var port = 8081; | |
var sockets = []; | |
var cols = [ | |
new Gpio(7, 'in', 'both'), | |
new Gpio(8, 'in', 'both'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
usage() { | |
echo "Usage: $0 { on | off | install | reset | id | listen | log | kill | learn }" | |
} | |
on() { | |
echo 1 >/sys/class/gpio/gpio8/value | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This code runs on MSP430 LaunchPad MSP-EXP430G2 and is compiled+uploaded with Energia | |
void setup() { | |
pinMode(P1_4,INPUT); //POWER BTN | |
// pinMode(P1_5,OUTPUT); //LED output | |
pinMode(P2_0,INPUT); //LED input | |
pinMode(P1_0,OUTPUT); //feedback LED1 | |
pinMode(P1_6,OUTPUT); //feedback LED2, represents state of P2_0 | |
OlderNewer