{"id":20696861,"url":"https://github.com/araobp/sensor-network-android","last_synced_at":"2026-05-10T16:31:56.708Z","repository":{"id":145719299,"uuid":"95327611","full_name":"araobp/sensor-network-android","owner":"araobp","description":"Wired sensor network for IoT with PIC16F1 and Android","archived":false,"fork":false,"pushed_at":"2017-12-23T23:04:06.000Z","size":34486,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T18:30:07.359Z","etag":null,"topics":["android","iot","kotlin","pic16f","sensor-network"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/araobp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-24T23:16:31.000Z","updated_at":"2020-05-23T20:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"693a2f4e-ac92-4092-aa71-b6ad1efaa31e","html_url":"https://github.com/araobp/sensor-network-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araobp%2Fsensor-network-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araobp%2Fsensor-network-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araobp%2Fsensor-network-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/araobp%2Fsensor-network-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/araobp","download_url":"https://codeload.github.com/araobp/sensor-network-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961754,"owners_count":20213315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","iot","kotlin","pic16f","sensor-network"],"created_at":"2024-11-17T00:15:40.742Z","updated_at":"2026-05-10T16:31:51.672Z","avatar_url":"https://github.com/araobp.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sensor network with Android\n\n![system](./doc/system.jpg)\n\n## Background and motivation\n\nOnce I used RasPi/Arduino for IoT prototyping, ending up with unsatisfying results: complicated physical wiring problems.\n\nSo I started thinking of a combination of [PIC16F1-based sensor network](https://github.com/araobp/sensor-network) and Android to simplify physical wiring.\n\n## Architecture\n\nThis is a framework for developing IoT applications on Android supporting dynamic feature enhancements:\n\n![architecture](./doc/architecture.jpg)\n\n- [(Physical) sensor network and sensor blocks with plug\u0026play protocol](https://github.com/araobp/sensor-network)\n- CLI and FTDI device driver (and BLE device driver to be supported in the future)\n- [Edge computing components plug-in](https://github.com/araobp/sensor-network-android/tree/master/src/app/src/main/java/jp/araobp/iot/edge_computing/plugin)\n- Flow-based programming (to be supported in the future)\n\nCLI is also positioned as a main UI to launch other activities (plug-in etc).\n\nSensor network simulator is provided for debugging applications on Android w/o a physical sensor network.\n\nI use [EventBus](http://greenrobot.org/eventbus/) to support messaging among components within the application on Android.\n\n### Sensor list\n\nMy smartphone is equipped with built-in sensors. I add a sensor network to my smart phone to add other sensors.\n\n|Sensor                   |Built-in|Add-on  |\n|-------------------------|--------|--------|\n|Three-axis Accelerometer | Y      | Y      |\n|Speed (hall sensor)      | N      | Y      |\n|Orientation sensor       | Y      | N      |\n|Magnetic sensor          | Y      | N      |\n|Temperature              | N      | Y      |\n|Humidity                 | N      | Y      |\n|GPS                      | Y      | N      |\n\n### Swapping Plug-in\n\nAt the moment, modify strings.xml manually to replace the current plug-in with another one:\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n\n    \u003c!-- Edge computing plug-in --\u003e\n    \u003c!-- Cycling --\u003e\n    \u003cstring name=\"edge_computing_plugin\"\u003ejp.araobp.iot.edge_computing.plugin.cycling.Cycling\u003c/string\u003e\n    \u003cstring name=\"edge_computing_plugin_activity\"\u003ejp.araobp.iot.edge_computing.plugin.cycling.CyclingActivity\u003c/string\u003e\n    \u003cstring name=\"edge_computing_plugin_button_name\"\u003eCycling\u003c/string\u003e\n    \u003c!-- Template\n    \u003cstring name=\"edge_computing_plugin\"\u003ejp.araobp.iot.edge_computing.plugin.template.Template\u003c/string\u003e\n    \u003cstring name=\"edge_computing_plugin_activity\"\u003ejp.araobp.iot.edge_computing.plugin.template.TemplateActivity\u003c/string\u003e\n    \u003cstring name=\"edge_computing_plugin_button_name\"\u003eTemplate\u003c/string\u003e\n    --\u003e\n\n\u003c/resources\u003e\n```\n\nIn the future, I will add a more dynamic way to swap plug-in.\n\n### Enabling built-in sensors\n\nAgain, modify strings.xml manually to enable/disable built-in sensors:\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n\n    \u003c!-- Built-in sensors --\u003e\n    \u003cstring name=\"enable_ambient_temperature\"\u003etrue\u003c/string\u003e\n    \u003cstring name=\"enable_relative_humidity\"\u003etrue\u003c/string\u003e\n    \u003cstring name=\"enable_accelerometer\"\u003efalse\u003c/string\u003e\n\n\u003c/resources\u003e\n```\n\n## Android apps\n\n### Use case: bicycle\n\nI develop in-bicycle network using the output from [sensor-network](https://github.com/araobp/sensor-network). It is like a cheap version of [CANopen](https://www.can-cia.org/canopen/) :-)\n\n### CLI Activity\n\n![screenshot_cli](./doc/screenshot_cli.png)\n\n### Cycling Activity\n\n![screenshot_cycling](./doc/screenshot_cycling.png)\n\n### Technical requirements\n\n- Very low power consumption\n- Cheap\n- Show current speed, acceleration, temperature and humidity on a character LCD\n- Save time-series data (speed, temperature, humidity, acceleration and location) onto Android smartphone\n\n### Thing: my bicycle\n\n![network](./doc/network.jpg)\n\n## Development tools\n\n### Programing language\n- [Kotlin](https://kotlinlang.org/)\n\n### IDE\n- [Android Studio](https://developer.android.com/studio/index.html)\n- [ADB](https://developer.android.com/studio/command-line/adb.html)\n\n### Libraries\n- [Android Java D2XX driver](http://www.ftdichip.com/Drivers/D2XX.htm)\n- [EventBus](http://greenrobot.org/eventbus/)\n\n## How to debug it\n\nSince smartphone's USB port is occupied, connect adb to the smartphone via WiFi following [the guide](https://developer.android.com/studio/command-line/adb.html):\n\n```\n1. adb tcpip 5555\n2. disconnect USB cable\n3. adb connect \u003cip address of smartphone\u003e:5555\n4. adb logcat\n```\n\nOr use the sensor network simulator included in this repo ![screen shot](./doc/simulator_with_ide.png)\n\n## Links\n- [My smart phone: ASUS ZenFone Lazer](https://www.asus.com/Phone/ZenFone-2-Laser-ZE500KL/)\n- [Dragon board (Quallcomm)](https://developer.qualcomm.com/hardware/dragonboard-410c)\n- [CANopen](https://www.can-cia.org/canopen/)\n- [BLE module that I purchased in Akihabara, Tokyo](http://akizukidenshi.com/catalog/g/gK-11102/)\n- [IoT appliance based on Android from Buffalo](http://buffalo.jp/news/2017/09/06_01/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faraobp%2Fsensor-network-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faraobp%2Fsensor-network-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faraobp%2Fsensor-network-android/lists"}