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 HOST = '127.0.0.1'; | |
var PORT = 3011; | |
function log(objs) { | |
var d = new Date, | |
fmtDate = '', | |
month; | |
var msg = {}; | |
month = d.getMonth() + 1; |
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 "Arduino.h" | |
#include <WebSocketClient.h> | |
#include <SPI.h> | |
#include <Ethernet.h> | |
// Enter a MAC address and IP address for your controller below. | |
// The IP address will be dependent on your local network: | |
byte mac[] = { | |
0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /* Edit here */ |
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
#!/usr/bin/env node | |
'use strict'; | |
/* | |
* | |
* | |
*/ | |
//var redis = require("redis"), | |
// rd = redis.createClient(); | |
var net = require('net'); | |
var conf = './plc.conf'; |
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
#!/usr/bin/env node | |
var redis = require("redis"), | |
client = redis.createClient(); | |
var net = require('net'); | |
var HOST = '127.0.0.1'; | |
var PORT = 3011; | |
function log(objs) { | |
var d = new Date, | |
fmtDate = '', |
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
/** | |
* simple RESTful server on SNOWSHOE | |
* | |
* @author : rockos | |
*/ | |
#include "srvhttp.h" | |
static DBM dbm; |
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 <Servo.h> | |
Servo myservo; | |
void setup() | |
{ | |
myservo.attach(8); | |
} | |
void loop() | |
{ | |
myservo.write(0); | |
delay(500); |
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
#define MAX_DIGIT 3 | |
int readData() { | |
char c[MAX_DIGIT] = "0"; | |
for (int i = 0; i < MAX_DIGIT; i++ ) { | |
c[i] = Serial.read(); | |
if (c[i] =='¥0') | |
break; | |
} | |
return atoi(c); | |
} |
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 <Servo.h> | |
Servo srv; | |
int deg = 0; | |
int save_deg = 0; | |
void setup() | |
{ | |
srv.attach(8); | |
Serial.begin(9600); | |
} |
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 <Servo.h> | |
Servo u_srv; | |
Servo l_srv; | |
void setup() | |
{ | |
u_srv.attach(10); | |
l_srv.attach(12); | |
} |
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 <Servo.h> | |
#define MAX_DIGIT 3 | |
Servo u_srv; | |
Servo l_srv; | |
int deg = 0; | |
int save_deg = 0; | |
void setup() |
OlderNewer