To try it out make sure you use the latest backpack from ajfisher/nodebots-hcsr04 using i2c_multiping branch
var five = require("johnny-five"); | |
var board = five.Board(); | |
//Define Data Command Parameters | |
var Mode_Address_Auto_Add_1 = 0x40 //0100 0000 B | |
var Mode_Permanent_Address = 0x44 //0100 0100 B | |
board.on("ready", function() { |
{ | |
"name": "lasertest", | |
"version": "1.0.0", | |
"description": "Used to pan tilt and fire a laser", | |
"main": "led.js", | |
"dependencies": { | |
"johnny-five": "^0.9.53" | |
}, | |
"devDependencies": {}, | |
"scripts": { |
/* | |
Basic ESP8266 MQTT example | |
This sketch demonstrates the capabilities of the pubsub library in combination | |
with the ESP8266 board/library. | |
It connects to an MQTT server then: | |
- publishes "hello world" to the topic "outTopic" every two seconds | |
- subscribes to the topic "inTopic", printing out any messages | |
it receives. NB - it assumes the received payloads are strings not binary |
This is the general instructions for how to get a pebble watch to talk to an ESP8266 and turn NeoPixels different colours.
Video: https://www.youtube.com/watch?v=BeIQ47WBVXs
- Pebble watch
- ESP8266 ESP-01
If you signed up for Cricket Australia's digital streaming service this summer you'd be pretty disappointed with the very tiny size of the video stream. For those of us that can't get terrestrial TV for whatever reason and use digital services and paid good money for them this is a terrible decision.
Thankfully, with a bit of CSS-fu it's possible to get an almost full-screen video feed and get rid of all those rubbish ads to boot.
This is version one - mostly because I only did enough to be satisfied watching the first ODI. I'll keep this updated and refine it over the course of the summer.
If you're a heavy user of the Twitter web client like me then you'll find the new inline preview feature extremely intrusive as it breaks up the timeline too much. If I wanted to use facebook or linkedin then I'd be using facebook or linkedin. Having said that, cards in Twitter are great and the ability to preview media before jumping off site is really cool - but it should be my choice, not have everything foisted on my timeline.
That the mobile client allows for this with a setting is even more annoying.
So here's the fix. This only works in Chrome but I'm sure an enterprising person could do something similar for Safari and Firefox using the same CSS. Pull requests to update instructions for other browsers are of course very welcome.
Copyright (c) Andrew Fisher and individual contributors. | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright |
// Ensure that you've done npm install johnny-five before you run this. | |
const five = require('johnny-five'); | |
const board = new five.Board({port: process.argv[2]}); | |
board.on("ready", function() { | |
// Create a standard `led` component instance | |
var led = new five.Led(13); |
var firmata = require('firmata'); | |
var repl = require('repl'); | |
var board = new firmata.Board('/dev/ttyAMA0',function(err){ | |
//arduino is ready to communicate | |
if (err) { | |
console.log("err:" + err); | |
return; | |
} | |
console.log("Firmata Firing LEDs"); |