Slides are here:
http://mhellar.github.io/physcomp2/3
Grab the code here:
http://bit.ly/2zP5PId
Slides are here:
http://mhellar.github.io/physcomp2/1
Grab the code here:
https://bit.ly/2J4OTRD
Johnny-Five is the original JavaScript Robotics programming framework. Released by Bocoup in 2012, Johnny-Five is maintained by a community of passionate software developers and hardware engineers. Over 75 developers have made contributions towards building a robust, extensible and composable ecosystem.
contents of package.json
<<<<<<< HEAD
{
"name": "J5_led_1",
"version": "1.0.0",
"description": "A Johnny Five LED app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"johnny-five": "^0.8.106"
}
}
=======
{
"name": "J5_led_1",
"version": "1.0.0",
"description": "A Johnny Five LED app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"johnny-five": "^0.8.106"
}
}
>>>>>>> 6a7bd66c79ee9ea4ba1a9bedf93f95b5c411cbfc
<<<<<<< HEAD
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var led = new five.Led(6);
led.blink(500);
});
<<<<<<< HEAD
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var led = new five.Led(6);
led.pulse(500);
});
=======
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var led = new five.Led(6);
led.pulse(500);
});
>>>>>>> 6a7bd66c79ee9ea4ba1a9bedf93f95b5c411cbfc
Led Animations
<<<<<<< HEAD
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var led = new five.Led(6);
led.pulse({
easing: "linear",
duration: 3000,
cuePoints: [0, 0.2, 0.4, 0.6, 0.8, 1],
keyFrames: [0, 10, 0, 50, 0, 255],
onstop: function() {
console.log("Animation stopped");
}
});
});
=======
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
var led = new five.Led(6);
led.pulse({
easing: "linear",
duration: 3000,
cuePoints: [0, 0.2, 0.4, 0.6, 0.8, 1],
keyFrames: [0, 10, 0, 50, 0, 255],
onstop: function() {
console.log("Animation stopped");
}
});
});
>>>>>>> 6a7bd66c79ee9ea4ba1a9bedf93f95b5c411cbfc
Reference
Connect a servo
Update code in code/twitter-ard/app.js
=======
Project: Twitter Lamp
Make this circuit
Go Here:
https://apps.twitter.com/
create a new app
Gather tokens and keys
Update code in code/twitter-ard/app.js
>>>>>>> 6a7bd66c79ee9ea4ba1a9bedf93f95b5c411cbfc
var client = new Twitter({
consumer_key: 'Enter Here',
consumer_secret: 'Enter Here',
access_token_key: 'Enter Here',
access_token_secret: 'Enter Here'
})
<<<<<<< HEAD
From the terminal:
'cd twitter-ard'
'node app.js'
From the terminal:
'cd twitter-ard-location'
'node app.js'
Twitter API Reference
Here
Project: Twitter Button
Update code in code/twitter-ard/app.js
=======
From the terminal:
'cd twitter-ard'
'node app.js'
From the terminal:
'cd twitter-ard-location'
'node app.js'
Twitter API Reference
Here
Update code in code/twitter-ard/app.js
>>>>>>> 6a7bd66c79ee9ea4ba1a9bedf93f95b5c411cbfc
var client = new Twitter({
consumer_key: 'Enter Here',
consumer_secret: 'Enter Here',
access_token_key: 'Enter Here',
access_token_secret: 'Enter Here'
})
<<<<<<< HEAD
The ESP8266
We need to solder the header pins on, let's do that now
The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (Micro Controller Unit) capability produced by Shanghai-based Chinese manufacturer, Espressif Systems.
The Adafruit Feather is a mini Arduino with Wifi, that is $16.00!
Getting Set up:
- First install the USB driver SiLabs serial driver
Getting Set up:
- Next go to the Arduino Preferences
Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Boards Manager URLs
Getting Set up:
- Next, use the Board manager to install the ESP8266 package.
Getting Set up:
Set Board to Adafruit HUZZAH ESP8266
Set port to SLABusbtoUART
Connect an led
Upload Blink
Upload WiFiWebServer
Upload ESPwebpage
Hook Up A Servo
Upload ESPwebpageServo
Connect GND, 5V, DI to pin 3
Node-pixel only works with Node LTS version
sudo n lts
Node-pixel needs a special version for Firmata
git clone https://github.com/ajfisher/node-pixel
Upload node_pixel_firmata.ino from the repo you just cloned
Reference