Skip to content

Commit

Permalink
Added ultrasonic sensor stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmckee committed Apr 14, 2016
1 parent fd98a0e commit 1d285c7
Show file tree
Hide file tree
Showing 46 changed files with 842 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arduino_ultrasonic_sensor/.babelrc
@@ -0,0 +1,8 @@
{
"presets": ["es2015", "react", "stage-0"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
1 change: 1 addition & 0 deletions arduino_ultrasonic_sensor/.eslintignore
@@ -0,0 +1 @@
dist/
11 changes: 11 additions & 0 deletions arduino_ultrasonic_sensor/.eslintrc
@@ -0,0 +1,11 @@
---
"extends":
- "eslint-config-defaults/configurations/walmart/es6-react"

"rules":
"indent": [2, 2, {"SwitchCase": 1}]
"max-len": 0

"env":
"browser": true,
"node": true
3 changes: 3 additions & 0 deletions arduino_ultrasonic_sensor/.gitignore
@@ -0,0 +1,3 @@
.DS_Store
node_modules
npm-debug.log
20 changes: 20 additions & 0 deletions arduino_ultrasonic_sensor/LICENSE
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2013

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 changes: 41 additions & 0 deletions arduino_ultrasonic_sensor/README.markdown
@@ -0,0 +1,41 @@
# Spectacle Boilerplate

## Reference

The Spectacle core API is available at [https://github.com/FormidableLabs/spectacle/blob/master/README.markdown](https://github.com/FormidableLabs/spectacle/blob/master/README.markdown).

## Development

After downloading the boilerplate, your first order of business is to open terminal and run `npm install`

Next, run `rm -R .git` to remove the existing version control.

Then, to start up the local server, run `npm start`

Open a browser and hit [http://localhost:3000](http://localhost:3000), and we are ready to roll

### On Windows

On Windows you might get an error saying

```
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
```

Thus, modify the npm scripts in `package.json` to properly set the `NODE_ENV` environment variable:

```json
...
"scripts": {
"build": "SET NODE_ENV=production & webpack --config webpack.config.production.js",
"start": "SET NODE_ENV=development & node server.js"
},
...
```

## Build & Deployment

Building the dist version of the project is as easy as running `npm run build`

If you want to deploy the slideshow to surge, run `npm run deploy`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arduino_ultrasonic_sensor/assets/bat.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arduino_ultrasonic_sensor/assets/city.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions arduino_ultrasonic_sensor/assets/deck.example
@@ -0,0 +1,28 @@
return (
<Deck transition={['zoom','slide']} transitionDuration={800}>
<Slide bgColor="primary">
<Heading size={1} fit caps>
React Presentations
</Heading>
<Heading size={2} fit caps>
Written In React
</Heading>
</Slide>
<Slide bgColor="black">
<Heading size={1} fit textColor="primary" textFont="secondary">
Wait What?
</Heading>
</Slide>
<Slide bgColor="primary" textColor="black" align="center top">
<Heading size={1} textColor="black" textFont="primary">
Thats right
</Heading>
<List>
<ListItem>Inline style based theme system</ListItem>
<ListItem>Autofit Text</ListItem>
<ListItem>react-router navigation</ListItem>
<ListItem>PDF Export</ListItem>
</List>
</Slide>
</Deck>
)
Binary file added arduino_ultrasonic_sensor/assets/dolphin.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions arduino_ultrasonic_sensor/assets/formidable-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions arduino_ultrasonic_sensor/assets/interactive.js
@@ -0,0 +1,44 @@
import React, { Component } from "react";
import { Heading } from "spectacle";

export default class Interactive extends Component {
constructor() {
super();
this.state = {
count: 0
};
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.setState({
count: this.state.count + 1
});
}
render() {
const styles = {
padding: 20,
background: "black",
minWidth: 300,
marginTop: 20,
textTransform: "uppercase",
border: "none",
color: "white",
outline: "none",
fontWeight: "bold",
fontSize: "2em"
};
return (
<div>
{this.state.count < 5 ?
<div>
<Heading size={5} textColor="black">
The button has been clicked {this.state.count} times
</Heading>
<button style={styles} type="button" onClick={this.handleClick}>Click Me</button>
</div> :
<Heading size={5} fit caps textColor="black">Easy there pal</Heading>
}
</div>
);
}
}
Binary file added arduino_ultrasonic_sensor/assets/kat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arduino_ultrasonic_sensor/assets/markdown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arduino_ultrasonic_sensor/assets/math.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arduino_ultrasonic_sensor/assets/submarine.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
198 changes: 198 additions & 0 deletions arduino_ultrasonic_sensor/dist/bundle.js

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions arduino_ultrasonic_sensor/index.html
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width initial-scale=1 user-scalable=no" />
<title>Spectacle Boilerplate</title>
<link href="https://fonts.googleapis.com/css?family=Lobster+Two:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/prism/1.3.0/themes/prism-tomorrow.css">
</head>
<body>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/prism/1.3.0/prism.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/prism/1.3.0/components/prism-jsx.min.js" type="text/javascript"></script>
<script src="./dist/bundle.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions arduino_ultrasonic_sensor/index.js
@@ -0,0 +1,6 @@
import React from "react";
import { render } from "react-dom";

import Presentation from "./presentation";

render(<Presentation/>, document.getElementById("root"));
51 changes: 51 additions & 0 deletions arduino_ultrasonic_sensor/package.json
@@ -0,0 +1,51 @@
{
"name": "spectacle-boilerplate",
"version": "1.0.1",
"description": "ReactJS Powered Presentation Framework",
"main": "lib/index.js",
"scripts": {
"clean": "rimraf dist",
"build": "NODE_ENV=production webpack --config webpack.config.production.js",
"lint": "eslint --ext .js,.jsx .",
"deploy": "npm run clean & npm run build && surge -p .",
"start": "NODE_ENV=development node server.js"
},
"author": "",
"license": "MIT",
"dependencies": {
"normalize.css": "3.0.3",
"react": "^0.14.3",
"react-dom": "^0.14.3",
"spectacle": "^1.0.0"
},
"devDependencies": {
"autoprefixer-core": "^6.0.1",
"babel-core": "^6.4.0",
"babel-eslint": "^5.0.0-beta6",
"babel-loader": "^6.2.1",
"babel-polyfill": "^6.3.14",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-react-hmre": "^1.0.1",
"babel-preset-stage-0": "^6.3.13",
"css-loader": "^0.23.0",
"eslint": "^1.8.0",
"eslint-config-defaults": "^7.1.1",
"eslint-plugin-filenames": "^0.1.2",
"eslint-plugin-react": "^3.6.3",
"express": "^4.13.3",
"file-loader": "^0.8.4",
"html-loader": "^0.4.0",
"is-buffer": "^1.1.1",
"markdown-loader": "^0.1.7",
"node-libs-browser": "^0.5.3",
"raw-loader": "^0.5.1",
"rimraf": "^2.4.4",
"style-loader": "^0.13.0",
"surge": "latest",
"url-loader": "^0.5.6",
"webpack": "^1.12.8",
"webpack-dev-middleware": "^1.2.0",
"webpack-hot-middleware": "^2.5.0"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions arduino_ultrasonic_sensor/presentation/game/bundle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions arduino_ultrasonic_sensor/presentation/game/index.html
@@ -0,0 +1,20 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ultrasonic_sensor</title>

<link rel="stylesheet" href="main.min.css"/>
</head>

<body>

<div id="ultrasonic_sensor-game" class="game"></div>

<script src="phaser.min.js"></script>

<script src="bundle.min.js"></script>

</body>
</html>

1 change: 1 addition & 0 deletions arduino_ultrasonic_sensor/presentation/game/main.min.css
@@ -0,0 +1 @@
body{width:100%;height:100%;margin:0;overflow:hidden}canvas{display:block}
27 changes: 27 additions & 0 deletions arduino_ultrasonic_sensor/presentation/game/phaser.min.js

Large diffs are not rendered by default.

0 comments on commit 1d285c7

Please sign in to comment.