caninos-loucos / caninos-sdk Goto Github PK
View Code? Open in Web Editor NEWFacilitando o uso da placa Labrador. 🐶💻
Home Page: https://pypi.org/project/caninos-sdk/
License: MIT License
Facilitando o uso da placa Labrador. 🐶💻
Home Page: https://pypi.org/project/caninos-sdk/
License: MIT License
Hoje temos a seguinte nota no README:
⚠️ Atenção: para usar as GPIOs semsudo
, é 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:
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.
O author da lib de i2c que usamos finalmente publicou ela no PyPI, o que significa que agora dá pra colocar a pylibi2c
no setup.cfg
. Isso facilitaria o uso da SDK.
The class Pin
could be refactored:
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
GPIO
or PWM
modesMore unit tests could be added:
Implement instantiation, control, and frame extraction from an attached camera. Could be a wrapper around OpenCV.
Implement the ability to control Wi-Fi connections.
wpa_supplicant
. Maybe it could even be a wrapper around wpa_cli
?connect(ssid: str, password: str) -> True | False, ConnectionInfo
status() -> ConnectionInfo
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
Could be a wrapper around the bluepy library.
Implement the ability to use SPI over the Labrador pins.
Currently it is possible only to write values to a GPIO.
A read_gpio() -> int
function should be implemented in the Pin
class.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.