Giter VIP home page Giter VIP logo

aiko_engine_mp's Introduction

Welcome !

Working on

  • Aiko Services a distributed embedded framework, which integrates the domains of AIoT, Machine Learning, Media Streaming and Robotics

  • Aiko Engine MP an implementation of Aiko Services that supports embedded devices running microPython

Projects

Interests

  • Embodied A.I and field robotics

  • Operating systems, distributed and embedded systems and the Actor Model

  • Influential programming languages: LISP, SmallTalk and more

  • Intersection of software and hardware

Integrating various technical domains

aiko_engine_mp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiko_engine_mp's Issues

RGB speed

I just hooked up 235 pixels using an 8 channel knock-off of the Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter - BSS138. Such overkill for one logic line, but it's keeping the 5V supply to the strip away from the SAO port.

My booting show-off flash in #38 is doing what I'd intended: at boot time, reassure me that I've configured and wired my LEDs correctly. Reckon I might port just the flash to aiko.led for that reason. But, it's sloooow. Writing 243 updates to 7 pixels each time and then calling aiko.led.np.write again is taking 7800ms with a delay of 1ms, 7900ms with the time.sleep_ms code removed—I'm not sure why—and 1990ms even if I do nothing except call aiko.led.np.write() 243 times with 235 pixels. I'll track my work trying to speed it up here until I raise the PR.

Core loop:

def initialise():
  colours = [aiko.led.black] + [gammify(h2c(hex)) for hex in COLOURS] + [aiko.led.black]
  ncolours = len(colours)
  npixels = aiko.led.np.n
  delay = max(1, DURATION_MS // (ncolours + npixels))

  aiko.led.fill(aiko.led.black)
  aiko.led.np.write()

  before = time.ticks_ms()

  for offset in range(0 - ncolours, npixels):
    for index in range(ncolours):
      pixel = offset + index
      if 0 <= pixel < npixels:
        aiko.led.np[pixel] = colours[index]
    aiko.led.np.write()
    time.sleep_ms(delay)

  after = time.ticks_ms()
  print("took {}ms to flash {} times with delay {}ms".format(after-before, npixels+ncolours, delay))
  aiko.led.fill(aiko.led.black)
  aiko.led.np.write()

aiko.net module too dependent on LED library.

At the moment, removing the requirement for the led module in main.py breaks the network loader. Given situations where you haven't got a neopixel on board to display the status then this causes a break if you remove it. It's also not configurable to use other types of visual display such as a normal LED or an OLED display.

Suggest the following changes:

  • have a global network state variable that can be updated by the aiko.net module as it polls, connects etc.
  • Move the current functionality that controls the LED behaviour into a loader_display module that can be instantiated as an application using configuration/main.py
  • This can then create a timer which polls the current state of the network global and reflects that to the appropriate display type.
  • This can be extended to have different sub modules for normal LED, neopixel and oled each of which can be created and then passed into the loader_display module on startup.

Syntax error in examples/buttons_slider.py

paul@silver:~/Documents/git/aiko_engine_mp/examples$ ./install.sh
File "buttons_sliders.py", line 85
print("Touch: " + str(slider_left), end=" \r")
^
SyntaxError: invalid syntax

RGB gamma and other compensations

@marcmerlin, the gamma adjustment code in #38 helped get the orange right but it strikes me:

  • The blue is too dim, which I'm guessing is just these pixels not being that great
  • The green is too bright, which might instead be the human retina
  • The gamma might not match my pixels because I just grabbed someone else's table
  • The ESP32 might be strong enough to generate its own tables at boot time off configured gamma and LED strength adjustments
  • It'd be nuts to keep all that to just one plugin when it could be in aiko.led so everyone could get their colours right first try

Got any links handy I can follow to learn more? I'm happy writing the code up. :)

OLED Enabled and similar should be application instantiable

At the moment to enable certain behaviour such as an OLED, you need to initialise it in main.py to make it available on and then bring it into your application code to use it.

Suggest moving the creation and initialisation step to the application level instead where it can then have more control. This will also allow for a generic interface such as nodebots to be able to create objects on the fly and not have to pre-determine what types of modules you want to use up front and then flash the firmware for it (for what amounts only to a config change).

Move `led` module to `ws2812` module

Suggest moving the current LED module to being a specific ws2812 module and then breaking this up to have the basic functions (turning LEDs on and off etc) as part of this and then add a high order "drawing" module on top of it which can use it (or any other displayable method - eg an OLED, LED matrix or other device that can display pixel data).

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.