I hereby claim:
- I am towynlin on github.
- I am towynlin (https://keybase.io/towynlin) on keybase.
- I have a public key whose fingerprint is 6477 2407 CE3A 48C0 2D32 0DD9 585E 75DD 1E3E 7AA1
To claim this, I am signing this object:
SYSTEM_MODE(SEMI_AUTOMATIC); | |
UDP udp; | |
char binaryDeviceID[12]; | |
const char SKIP_FROM_9_TO_A = 'a' - '9' - 1; | |
int presence_announcement_coap(unsigned char *buf, const char *id) | |
{ | |
buf[0] = 0x50; // Confirmable, no token | |
buf[1] = 0x02; // Code POST |
static char macString[18]; | |
static int t = 0; | |
static bool printed = false; | |
void setup() { | |
Spark.variable("mac", macString, STRING); | |
Serial.begin(115200); | |
byte mac[6]; | |
WiFi.macAddress(mac); |
int last = 0; | |
char buf[256]; | |
int toSerial(String s) { | |
Serial.print("You said via REST API: "); | |
Serial.println(s); | |
memset(buf, 0, 256); | |
int charsRead = 0; | |
while (Serial.available() && charsRead < 255) { |
SYSTEM_MODE(SEMI_AUTOMATIC); | |
bool wasConnecting = false; | |
int startedConnectingAt = 0; | |
void setup() { | |
Spark.connect(); | |
} | |
void checkForTimeout() { |
int binaryToSerial(String s) { | |
int len = s.length(); | |
for (int i=0; i < len; i++) { | |
Serial.write(s[i]); | |
Serial.write(' '); | |
Serial.println(s[i], HEX); | |
} | |
return len; | |
} |
I hereby claim:
To claim this, I am signing this object:
% gem update rubysl-openssl -- --with-openssl-dir=/usr/local/Cellar/openssl/1.0.1j | |
Updating installed gems | |
Updating rubysl-openssl | |
Building native extensions with: '--with-openssl-dir=/usr/local/Cellar/openssl/1.0.1j' | |
This could take a while... | |
ERROR: Error installing rubysl-openssl: | |
ERROR: Failed to build gem native extension. | |
/Users/zac/.rbenv/versions/rbx-2.2.10/bin/rbx extconf.rb --with-openssl-dir=/usr/local/Cellar/openssl/1.0.1j | |
checking for t_open() in -lnsl... no |
/var/folders/73/f9rt6pzx2q1dgsqq_5kn6vw40000gn/T/ruby-build.20141024163757.86591 ~/code/spark/website | |
HTTP/1.1 200 OK | |
Content-Type: binary/octet-stream | |
Content-Length: 503012 | |
Connection: keep-alive | |
Date: Thu, 23 Oct 2014 15:35:23 GMT | |
Last-Modified: Fri, 23 May 2014 08:48:21 GMT | |
ETag: "5fe00cda18ca5daeb43762b80c38e06e" | |
Accept-Ranges: bytes | |
Server: AmazonS3 |
#include "application.h" | |
TCPClient client; | |
const byte SERVER[] = { 192, 168, 0, 100 }; // <-- Change to your server | |
const int PORT = 4567; | |
const char REQ_FORMAT[] = "POST / HTTP/1.0\r\n" | |
"Host: example.com\r\n" | |
"Content-Length: %d\r\n" | |
"\r\n%s"; | |
const int MAX_REQ_SIZE = 256; |
#include "application.h" | |
const char PONG_DEBUG = 1; | |
static char score[4] = "0-0"; | |
static char paddle1 = 0; | |
static char paddle2 = 0; | |
bool increment_score(char player) | |
{ |