https://github.com/targist/ardui Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] # * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} targist / ardui * Notifications * Star 16 * Fork 0 This project aims to simplify creation of basic Arduino programs by just editing a UI on Android. targist.com MIT License 16 stars 0 forks Star Notifications * Code * Issues 7 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 1 tag Code Clone HTTPS GitHub CLI [https://github.com/t] Use Git or checkout with SVN using the web URL. [gh repo clone targis] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @elkasimi elkasimi Small fixes for html UI ... cdafa7a Aug 2, 2021 Small fixes for html UI cdafa7a Git stats * 24 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time arduiapp remove presentations Jul 30, 2021 arduino-library adjust paths Jul 18, 2021 html-serial-ui Small fixes for html UI Aug 2, 2021 images add release script Jul 18, 2021 proto change package name Jul 18, 2021 .gitignore add release script Jul 18, 2021 LICENSE Create LICENSE Aug 2, 2021 Makefile Add copy release step Jul 18, 2021 README.md Update README.md Aug 2, 2021 View code [ ] ArdUI A video explanation Project aim Build and deploy the generic program to your Arduino board Technical details Web interface How bindings are generated? Java bindings C bindings JS bindings Limitations Contributions Found a bug? README.md ArdUI A video explanation If you are more a fun of video explanation go to this youtube video [68747470733a2f2f696d672e796f75747562652e636f6d2f76692f41476a4848] Project aim This project aims to simplify creation of basic Arduino programs by just editing a UI on Android. Instead of the usual Arduino development cycle: arduino-usual-flow You have just to create your program via the Android UI and send it Arduino via Serial. [ardui-0] [ardui-1] [ardui-2] [ardui-3] In order to make the setup work you have to do two things Build and deploy the generic program to your Arduino board in order to do that * Include the ArdUI.zip (./arduino-library/generated/c/ArdUI.zip) library (You can include the Library zip can in Arduino IDE via: Sketch -> Include Library -> Add .ZIP Library.) * Upload GenericProgram.ino to your Arduino board. That's it! All subsequent changes to the Arduino Program can be done with Android UI now. Technical details Below is a technical description for whats happening under the hood The workflow go as described here * a Protobuf file is used to describe the serialization/ deserialization of data between Kotlin objects, byte streams and C structures. the Protbuf file used here to describe the data format is located at ./proto/common.proto * The Android application allows to create a program in UI which is translated to data classes generated by the Protobuf generator. * This data is serialized and sent to Arduino via the Serial. * The C program in Arduino deserializes the received bytes and construct the set of instructions to run. The fact that Protobuf is supported for an array of languages allowed us to write programs in Kotlin (for Android), C (for Arduino) and JS (for a NodeJS app) Web interface A NodeJS application is provided too in case you don't have access to an Android phone. The interface is pretty simple and basic; you have 2 text fields: 1. For setup instructions 2. For loop instructions This is the syntax to use for writing instructions: pinmode [input|output|input_pullup] digitalwrite pin [low|high] analogwrite pin value sleep duration Press upload button and it should work. More details can be found Here How bindings are generated? Java bindings This is generated using the wire library, the gradle plugin seemed like the easiest way, all you need is for this case is to include wire { sourcePath { srcDir '../../proto' } kotlin{} } in your build.gradle file, and it will keep your generated stub up to date with the protobuf spec. C bindings The C binding is generated with nanopb library; it is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system. C bindings are generated for our project with the following steps: 1. clone the repository locally git clone https://github.com/nanopb/nanopb.git 2. generate the bindings from .proto files: NANOPB=path/to/nanopb ${NANOPB}/generator/nanopb_generator.py \ -D ./arduino-library/generated/c \ -I ./proto \ common.proto 3. copy the utility nanopb files: cp ${NANOPB}/pb_common.h \ ${NANOPB}/pb_common.c \ ${NANOPB}/pb_decode.h \ ${NANOPB}/pb_decode.c \ ${NANOPB}/pb.h \ ./arduino-library/generated/c zip -j ./arduino-library/generated/c/ArdUI.zip ./arduino-library/generated/c/*.h ./arduino-library/generated/c/*.c You can include the Library zip can in Arduino IDE via: Sketch -> Include Library -> Add .ZIP Library.. N.B: probably you will need the nanopb dependencies for Python. You can install them with: pip3 install scons protobuf grpcio-tools JS bindings to create the needed JS binding you can run the following command: protoc --proto_path=./proto \ --js_out=import_style=commonjs,binary:html-serial-ui/js \ common.proto More details can be found Here Limitations * Currently, only 8 instructions are supported for setup and 16 for loop. * 4 types of instructions are supported now: + setPinMode + digitalWrite + analogWrite + sleep Contributions Contributions are welcome! Just create your pull request and it will be reviewed and merged ASAP. Found a bug? Describe your bug and the steps to reproduce it in an issue and it will be addressed by us. About This project aims to simplify creation of basic Arduino programs by just editing a UI on Android. targist.com Topics nodejs android arduino serial protobuf Resources Readme License MIT License Releases 1 0.0.1 Latest Jul 18, 2021 Packages 0 No packages published Contributors 2 * @acbeni acbeni Beniasaad Achraf * @elkasimi elkasimi Abdessamad El Kasimi Languages * C 32.3% * Kotlin 29.0% * JavaScript 21.1% * C++ 16.9% * Other 0.7% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.