Skip to content

Instantly share code, notes, and snippets.

View Frijol's full-sized avatar

Kelsey Frijol

View GitHub Profile
@Frijol
Frijol / wifi
Last active August 29, 2015 14:11
Gets wifi on and keeps it alive on a Tessel
var wifi = require('wifi-cc3000');
var wifiSettings = {
ssid: "technicallyWifi",
password: "scriptstick",
timeout: 40
};
var port = 8000;
var connected = false;
var debug = false;
@Frijol
Frijol / FinalCakeGui
Created August 22, 2014 17:46
AutoFrost Cake Python GUI
# Last modified 12/14/2010
#
# Purpose: This code generates all parts of the cake creation GUI,
# converts user input to motor commands, and sends those commands to the arduino
from Tkinter import *
import sys
import serial
class Callable:
@Frijol
Frijol / workingcontrolwfrosting
Created August 22, 2014 17:44
Arduino Control AutoFrost
const int logicpinx = 8;
const int pulsepinx = 9;
const int logicpiny = 10;
const int pulsepiny = 11;
const int frostpin = 12;
const int limitpinx = 3;
const int limitpiny = 4;
int limitpin;
int logicpin = logicpinx;
int pulsepin = pulsepinx;
var location = 'San Francisco' // Write where you're tweeting from!
// Node requires
var fs = require('fs');
var https = require('https');
var crypto = require('crypto');
// Set up to Tweet
var bound = require('crypto').pseudoRandomBytes(16).toString('hex');
var ctype = 'multipart/form-data; boundary=' + bound;
@Frijol
Frijol / tessel-camera
Created July 27, 2014 21:03
tessel-camera
// Require libraries
var tessel = require('tessel');
var camera = require('camera-vc0706').use(tessel.port['A']);
// Set up an LED to notify when we're taking a picture
var notificationLED = tessel.led[3];
// When the camera is ready, print a message in the console.
camera.on('ready', function () {
console.log('Press the config button to take a picture!');
@Frijol
Frijol / NodeHttpOnTessel.js
Last active August 29, 2015 14:01
Making an HTTP GET with Node http module on Tessel
var http = require('http');
console.log('http get...');
http.get("http://api.openweathermap.org/data/2.5/weather?id=5327684&units=imperial", function(res) {
console.log(res.statusCode);
if (res.statusCode == 200) {
var body = '';
res.on('data', function(chunk) {
body += chunk;
var tessel = require('tessel');
var led1 = tessel.led(1).output().high();
var led2 = tessel.led(2).output().low();
setInterval(function () {
led1.toggle();
led2.toggle();
}, 100);