https://imgur.com/a/brNa5Qn see this link for an imgur gallery of OTG living
- Jordan Mynes
- Joshua Mac-Williams
- Ludin Castillo
- James "Tucker" Arnold
- 1x Arduino MKR 1000 (WiFi Enabled)
- USB-A Cable
- Laptop running Antergos Linux/Windows 10
- Arduino software
- 1x Micro Servo 9g - SG90
- Ideally this should be externally powered, we have not set that up yet. We could also use the VIN port on the Arduino, but have yet to explore that route fully.
- LEDs
- Rewriteable NFC tags
- Android phone with:
- git clone
- Match Arduino MKR 1000 & Breadboard to fritzing diagram
- Arduino IDE Setup:
- Tools > Boards > Manage Boards
- Install Arduino SAMD Boards, for our mkr1000
- Sketch > Include Library > Manage Libraries
- Search for and install wifi101 library
- Manually install Blynk library
- Restart Arduino IDE
- Tools > Boards > Manage Boards
- If above steps are all successful, upload arduino/blynk.io
- If it claims that the Blynk, Servo, or any other library wasn't found, then compile from source, or run the binary exe if you're on Windows
- Android phone (in our case, a Gen 1 Google Pixel XL running Android 8.1)
- Installed the following apps from the Tech Specs section of this README
- This tutorial will show how to trigger a tasker function
- It's basically a simple API request with a value sent to a digital or virtual pin, interpreted by Blynk (over HTTP, sadly), and the rest is as README follows.
- If NFC tag is tapped on our display
- Trigger runs a related Tasker task
- HTTP auth'd RESTful call to Blynk's server, a pin and a parameter
- Blynk's server forwards the task to our Arduino over the Internet
- Arduino MKR 1000 receives task over WiFi (in our case, using the same Pixel XL's hotspot to get around school network authentication)
- Arduino tells LED/Servo(s) to do task
- Instead, we can also use a graphical control panel with the Blynk app
- Click the digital control labeled for a specific LED/Servo(s)
- Moving servos between 0 and 90 in a binary configuration is surprisingly rough.
- Slight jitter, works better on 5v despite higher jitter
- StackOverflow suggestions
- Worst jitter at 0, rests ok at 10, 90, 170-180
- Slight jitter, works better on 5v despite higher jitter
- We wasted a lot of time trying to make this work with Bluetooth. In the interest of that time spent, the abandoned Bluetooth branch is preserved for archival purposes.
- Or read this thread, we used the version from the final post