doorlock/readme.md

80 lines
1.4 KiB
Markdown
Raw Normal View History

2018-03-03 21:28:55 +00:00
# Chimera Doorlock
> A Tessel powered RFID doorlock for the space, interfacing with Cobot
2018-03-03 21:28:55 +00:00
Powered by a [Tessel][tessel]
## Development
Follow the [start guide][start] on [Tessel.io][tessel].
2018-03-03 21:30:38 +00:00
Install the correct version of node using nvm:
2018-03-03 21:28:55 +00:00
```bash
2018-03-03 21:30:38 +00:00
nvm install
nvm use
npm install
2018-03-03 21:28:55 +00:00
```
2018-03-03 21:30:38 +00:00
Now install `t2-cli` globally:
2018-03-03 21:28:55 +00:00
```bash
2018-03-03 21:30:38 +00:00
npm install -g t2-cli
2018-03-03 21:28:55 +00:00
```
2018-03-03 21:30:38 +00:00
Plug your Tessel in.
2018-03-03 21:28:55 +00:00
Now you can deploy to your connected Tessel device:
```bash
npm start
```
### Testing
We use [Jest][jest] to do testing of the core code in the library. Make sure to write tests for new code or update tests on existing code as needed. Test files are next to their source file named with a `.test.js` extension.
Run tests once: `npm test`
Run tests watching for changes: `npm run watch-test`
### RFID Cards
Read cards from Cobot:
<https://www.cobot.me/api-docs/check-ins#list-check-in-tokens>
### Useful Commands
```bash
# Connect to WiFi
t2 wifi -n network-name -p "some password"
# List devices
t2 list
# Update Tessel
t2 update
# Deploy code
t2 push index.js
# Clear code
t2 erase
# Create access point and server
t2 ap -n doorlock
```
### Networking
To find the IP address of your Tessel, download the iOS app Fing and look for a device on your network called `doorlock`.
2018-03-03 21:28:55 +00:00
### USB Storage
* Make sure to format USB to be FAT32!
2018-03-03 21:30:38 +00:00
[jest]: https://facebook.github.io/jest
2018-03-03 21:28:55 +00:00
[start]: http://tessel.github.io/t2-start
[tessel]: http://tessel.io