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 is written by Yeseul Song on top of Tom Igoe's ADSx15 example described below. | |
*/ | |
/* | |
Potentiometer and temperature sensor reader for | |
ADS1x15 analog-to-digital converter on Raspberry Pi. | |
This script reads two analog sensors through | |
a Texas Instruments ADS1x15 ADC. Channel 1 has a potentiometer attached, |
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 express = require('express'); | |
var bodyParser = require('body-parser'); | |
var path = require('path'); | |
var app = express(); | |
// Body Parser Middleward | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({extended: 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Week1</title> | |
</head> | |
<body style = "font-size: 30pt;"> | |
<h2>MIND READER</h2> | |
<p> | |
<form method="GET" action="/numguess"> | |
Pick a number between 0 and 10. <br/> |
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
'use strict'; | |
const Alexa = require('alexa-sdk'); | |
const APP_ID = undefined; | |
const SKILL_NAME = 'Diary'; | |
const GET_FACT_MESSAGE = "I remember the day."; | |
const HELP_MESSAGE = 'Alexa is on the floor everyday and she remembers everything she has seen and heard. Ask her what happened on the floor on a certain day.'; | |
const WELCOME_MESSAGE = 'Alexa is on the floor everyday and she remembers everything she has seen and heard. Ask her what happened on the floor on a certain day.'; |
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
'use strict'; | |
const Alexa = require('alexa-sdk'); | |
const APP_ID = undefined; | |
const SKILL_NAME = 'Wording Train'; | |
const GET_FACT_MESSAGE = "Okay! "; | |
const HELP_MESSAGE = 'Play a word game with your Alexa. The rule is very simple. You and Alexa will take turns to say a word which is starting with the last character of a previous word.'; | |
const HELP_REPROMPT = 'What can I help you with?'; |
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
Table table; | |
int rowCount = 0; | |
int fillColor; | |
float cellSize = 10; | |
void setup() { | |
size(80, 2700); | |
table = loadTable("binary_data.csv", "header"); | |
for (TableRow row : table.rows()){ | |
String binary_num = row.getString("binary"); |
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 INIT FOR GYRO | |
*/ | |
#include <Wire.h> | |
// Register names according to the datasheet. | |
// According to the InvenSense document | |
// "MPU-6000 and MPU-6050 Register Map | |
// and Descriptions Revision 3.2", there are no registers | |
// at 0x02 ... 0x18, but according other information |
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
// receive a serial value (gyroX) from Arduino to save to the variable below (left) | |
var left = -7; | |
var right = -left; | |
function setup() { | |
createCanvas(400, 400); | |
stroke(0); | |
angleMode(DEGREES); |
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
// MPU-6050 Accelerometer + Gyro | |
// ----------------------------- | |
// | |
// By arduino.cc user "Krodal". | |
// | |
// June 2012 | |
// first version | |
// July 2013 | |
// The 'int' in the union for the x,y,z | |
// changed into int16_t to be compatible |
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 express = require('express'); | |
var app = express(); | |
app.get('/test', function (req, res) { | |
console.log('test'); | |
}); | |
app.listen(3000); |
NewerOlder