npm install johnny-five
- Plug in Logitech Gamepad to linux laptop
- plug in tinyduino with lightring shield.
- run
sudo node move.js
- move the gamepad to see lights move.
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
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
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
// Reads accel data and logs to serial. then flashes lights. When x is level, it goes faster. | |
#include <Wire.h> | |
#define BMA250_I2CADDR 0x18 | |
#define BMA250_RANGE 0x03 // 0x03 = 2g, 0x05 = 4g, 0x08 = 8g, 0x0C = 16g | |
#define BMA250_BW 0x08 // 7.81Hz (update time of 64ms) | |
int AccelX; | |
int AccelY; |
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
Tabella | |
@SERVER@-@DATABASE@-@TABLE@-%Y%m%d-%H%M%S | |
Database | |
@SERVER@-@DATABASE@-%Y%m%d-%H%M%S | |
Server | |
@SERVER@-%Y%m%d-%H%M%S |
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
<?php | |
/** | |
* @file | |
* Contains \Drupal\example_module\Controller\ExampleModuleController. | |
*/ | |
// THIS FILE BELONGS AT /example_module/src/Controller/ExampleModuleController.php | |
namespace Drupal\example_module\Controller; |
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
# Place on top of Wordpress own redirect rules | |
# If a file (-f) or directory (-d) doesn't exist on the local host, | |
# A 302 redirect request is made to the production host. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#Redirect WordPress uploads | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f |
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
pragma solidity ^0.4.19; | |
contract ERC721 { | |
string constant private tokenName = "My ERC721 Token"; | |
string constant private tokenSymbol = "MET"; | |
uint256 constant private totalTokens = 1000000; | |
mapping(address => uint) private balances; | |
mapping(uint256 => address) private tokenOwners; | |
mapping(uint256 => bool) private tokenExists; | |
mapping(address => mapping (address => uint256)) private allowed; | |
mapping(address => mapping(uint256 => uint256)) private ownerTokens; |
I'm too lazy to write this as official documentation so I'm transcribing my experiences here for reference.
This is high level and does not cover how to setup your peer, only how to use the API itself.
This is not a tutorial.
If you are just getting started, this tutorial by DevLogLogan is worth watching.
OlderNewer