Coder Social home page Coder Social logo

hgdeoro / py-arduino Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 7.63 MB

Communicate with Arduino from Python

Home Page: http://hgdeoro.github.io/py-arduino/

License: GNU General Public License v2.0

Shell 0.13% Python 24.13% CSS 36.49% JavaScript 22.46% PHP 2.79% C++ 8.56% C 2.94% Arduino 2.49%

py-arduino's People

Contributors

hgdeoro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

py-arduino's Issues

Un-reserve pins without recent activity

A background task can reserve pins, to avoid being modified from UI.

If the background task exits, the pin remains reserved. We should implement some way to un-reserve pin:

  • automatic "timeout": after some time, if the pin is not used, it's un-reserved
  • manually, from the web UI

Hide unused pins

Arduino Mega has too many pins, and make the UI bigger and slower.

We should implement some way to "hide" the unused pins:

  • automatically: show only used pins (in background task or used from web)
  • manually: manually hide/show pins

Background tasks shouldn't reserve non-existing pins

Running:

$ python examples/bg_log_values_analog_pin.py --pin=99
INFO:py_arduino_web.pyroproxy.utils:Wait to let PyRO server start up
INFO:bg_log_values_analog_pin.py:Starting on pin: 99

should exit with error since there is NO analog pin 99.

On the web you can see the pin being read:

Background tasks
MuleAnalogPinLogger on pin 99 A99 (0.483 sec. ago)

This was done in the emulator, but py-arduino should have detected this and return with error.

image

Refresh only modified pins

Instead of returning all the values for all the pines, only return the values of modified pines since the last check.

This is needed to speedup the update of the UI with Arduino with many pins (Arduino Mega)

JS for control panel shouldn't be loaded in index.html

In index.html you can found:

<script src="/control_panel/js/"></script>

As the first iteration, it's acceptable. But all the code related to control panel (that JS and JS for charts, etc.) should be removed from index.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.