Giter VIP home page Giter VIP logo

caninos-sdk's People

Contributors

augrm avatar g-lsitec avatar geonnave avatar jn513 avatar vbortoloti avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jn513

caninos-sdk's Issues

GPIO sem sudo

Hoje temos a seguinte nota no README:

⚠️ Atenção: para usar as GPIOs sem sudo, é necessário rodar os comandos abaixo, toda vez que se reinicia a placa:

sudo chown caninos /dev/gpiochip*
sudo chmod g+rw /dev/gpiochip*

É necessário investigar uma forma de habilitar o uso dos GPIOs sem sudo de forma persistente, ou seja, independente se a placa é reiniciada ou não.

Ainda, é necessário considerar o seguinte:

  • Os GPIOs são protegidos por uma razão: mexer neles pode desconfigurar o que não deveria, por exemplo alguns GPIOs são usados para controlar o Wi-Fi. Quem resolver esse issue deve também apresentar uma solução para esse problema.

Write docs / Documentar

en: Help is needed to write documentation (via docstrings) on how to use this SDK. Please respond in this issue if you want to help.

pt: Precisamos de ajuda para escrever a documentação (no formato docstrings) sobre como usar a SDK. Se quiser ajudar, responda nesta issue.

General improvements

The class Pin could be refactored:

  • Instead of using if self.board.cpu_architecture == "x86_64": to check whether it is running on a PC, it could implement a behavior for each case, e.g. LabradorPin and VirtualPin
  • Similarly, it could implement a behavior when using GPIO or PWM modes

More unit tests could be added:

  • Verify that a given Pin value was correctly set (when used in the GPIO mode).

Device control: Camera

Implement instantiation, control, and frame extraction from an attached camera. Could be a wrapper around OpenCV.

Device control: Wi-Fi

Implement the ability to control Wi-Fi connections.

  • This feature should consider possible conflicts with the GUI's Network Manager and wpa_supplicant. Maybe it could even be a wrapper around wpa_cli?
  • Minimal proposed API:
    • connect(ssid: str, password: str) -> True | False, ConnectionInfo
    • status() -> ConnectionInfo
  • Additional API functions:
    • connect_async(ssid: str, password: str, on_connect: lambda)
    • disconnect()

Finally, here's a suggestion for ConnectionInfo:

class ConnectionInfo:
  status = "disconnected" | "connecting" | "connected"
  interface # e.g., wlan0
  ip_address
  mac_address

Change from GPIO to PIN

Calling it PIN would make more sense, considering that we use the class to enable not only gpios, but also pwm, and may also use it for spi and i2c in the future.

For example:

# before
labrador.gpio15.enable_io(GPIO.Direction.OUTPUT, alias="led_status")

# after
labrador.pin15.enable_gpio(GPIO.Direction.OUTPUT, alias="led_status")

Conversely:

# before
labrador.gpio13.enable_pwm(alias="led1", freq=50, duty_cycle=0.1)

# after
labrador.pin13.enable_pwm(alias="led1", freq=50, duty_cycle=0.1)

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.