diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fcc4b0a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Tanner Collin + +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. diff --git a/README.md b/README.md index 74579b3..700105e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,37 @@ -## Counter Example +# Exact Resistor Calculator +Recommends resistors to combine in parallel to meet an exact target. -#### React-Native 0.32.0 & Redux 3.5.2 & React-Redux 4.4.5 +## Usage -This repo demonstrates the usage of latest React-Native with Redux. +Enter the target resistance you wish to make in the first field. +The app will then recommend a value for a resistor to start with. +It will be the same value as you entered because that will obviously get you to your target. -### Usage +Next go find a resistor as close to the recommended value and then measure it. +Enter the reading into the list of resistors that you have. +Then keep doing this for all the resistor values that the app recommends. -- you have to use `npm@3.x`, if you are using `npm@2.x` you might get into some weird scenarios. Please open an issue if you can't get it run on `npm@2.x`. also you can follow this [issue](https://github.com/rackt/react-redux/issues/236) for more info. -- clone the project -- go to `Counter` folder -- run `npm install` +Within 2-3 resistors, you'll notice the percent error from your target will drop well into a suitable range. -Cheers, +## Setup + +Please install Exact Resistor Calculator from the Google Play Store on your Android phone for free. + +## Source Code + +### License + +Exact Resistor Calculator is free and open-source software released under the MIT License. + +### Building + +Building Exact Resistor Calculator from source is very easy. +Clone this repository, set up react-native, and then run these commands: + +``` +$ npm install +$ react-native run-android +$ react-native start +``` + +If you want to debug on your physical phone, be sure to run ```adb reverse tcp:8081 tcp:8081``` first. diff --git a/android/app/BUCK b/android/app/BUCK index f5245b2..abe6023 100644 --- a/android/app/BUCK +++ b/android/app/BUCK @@ -46,13 +46,13 @@ android_library( android_build_config( name = 'build_config', - package = 'com.counter', + package = 'com.exactresistorcalculator', ) android_resource( name = 'res', res = 'src/main/res', - package = 'com.counter', + package = 'com.exactresistorcalculator', ) android_binary( diff --git a/android/app/build.gradle b/android/app/build.gradle index cd4cca4..05f127e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -88,7 +88,7 @@ android { buildToolsVersion "23.0.1" defaultConfig { - applicationId "com.counter" + applicationId "com.exactresistorcalculator" minSdkVersion 16 targetSdkVersion 22 versionCode 1 diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b333661..131a595 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.exactresistorcalculator"> diff --git a/android/app/src/main/java/com/counter/MainActivity.java b/android/app/src/main/java/com/counter/MainActivity.java index 313c379..cd4a343 100644 --- a/android/app/src/main/java/com/counter/MainActivity.java +++ b/android/app/src/main/java/com/counter/MainActivity.java @@ -1,4 +1,4 @@ -package com.counter; +package com.exactresistorcalculator; import com.facebook.react.ReactActivity; @@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity { */ @Override protected String getMainComponentName() { - return "Counter"; + return "exactresistorcalculator"; } } diff --git a/android/app/src/main/java/com/counter/MainApplication.java b/android/app/src/main/java/com/counter/MainApplication.java index a9bfa37..ffaa204 100644 --- a/android/app/src/main/java/com/counter/MainApplication.java +++ b/android/app/src/main/java/com/counter/MainApplication.java @@ -1,4 +1,4 @@ -package com.counter; +package com.exactresistorcalculator; import android.app.Application; import android.util.Log; diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 2408859..be4591a 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - Counter + Exact Resistor Calculator diff --git a/android/settings.gradle b/android/settings.gradle index 831ce76..d7ea472 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,4 @@ -rootProject.name = 'Counter' +rootProject.name = 'exactresistorcalculator' include ':app' diff --git a/index.android.js b/index.android.js index 0352315..f1593f3 100644 --- a/index.android.js +++ b/index.android.js @@ -3,4 +3,4 @@ import React, { AppRegistry } from 'react-native'; import App from './src/containers/app'; -AppRegistry.registerComponent('Counter', () => App); +AppRegistry.registerComponent('exactresistorcalculator', () => App); diff --git a/index.ios.js b/index.ios.js index 0352315..f1593f3 100644 --- a/index.ios.js +++ b/index.ios.js @@ -3,4 +3,4 @@ import React, { AppRegistry } from 'react-native'; import App from './src/containers/app'; -AppRegistry.registerComponent('Counter', () => App); +AppRegistry.registerComponent('exactresistorcalculator', () => App); diff --git a/package.json b/package.json index 204ff26..c8cbb3e 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,16 @@ { - "name": "Counter", - "version": "0.0.1", - "private": true, + "name": "exact-resistor-calculator", + "version": "1.0.0", + "description": "Recommends resistors to combine in parallel to meet an exact target.", + "repository": { + "type": "git", + "url": "https://github.com/tannercollin/exact-resistor-calculator" + }, "scripts": { - "start": "react-native start", - "setup_project": "npm run step1; npm run step2", - "step1": "rm -rf node_modules/react-native/node_modules/react; rm -rf node_modules/react-native/node_modules/fbjs; rm -rf node_modules/react/node_modules/fbjs", - "step2": "cd node_modules; find . -name .babelrc | grep -v packager | xargs rm" + "start": "react-native start" }, + "author": "Tanner Collin (http://github.com/tannercollin)", + "license": "MIT", "dependencies": { "react": "15.3.2", "react-native": "0.34.0",