Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tixy.land inspired mode [enhancement] #38

Open
juliendorra opened this issue May 6, 2023 · 1 comment
Open

tixy.land inspired mode [enhancement] #38

juliendorra opened this issue May 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@juliendorra
Copy link

A new creative coding mode inspired by tixy.land

Context
tixy (https://tixy.land/) is a very simple creative coding playground. Users can write a short formula using the time, index, x and y parameters, and the formula is evaluated and returned for each dot, and values are capped between -1 and 1. 0 to 1 means a white dot. 0 to -1 a red dot, with 1/-1 the max size and 0 no dot.

More infos there: https://twitter.com/aemkei/status/1323399877611708416

The code is simple enough and easy to ready:
https://github.com/aemkei/tixy/

Limitation
We of course drop the color (negative values) dots.
Using persistence of vision and a fast refresh rate could help turning the dot size value into LED intensity values.

Adaptation
We could store and compute the formula on the micro-controller (using https://github.com/owenmcateer/tixy.land-display and https://github.com/codeplea/tinyexpr for example)

But much probably the easiest way to get a working version with reasonable effort is reuse and adapt the web front of tixy.land:

  • use the computed value by the web page,
  • send the values to the micro-controller as a stream
  • the micro-controller then drive the LEDs, acting as just a dumb receiver.

Plus: The preview and interpreter is already there, and the receiving code on the micro-controller can be simpler, focusing on driving the LEDs. All the existing tixy formulas shared on twitter and elsewhere can be tried.

Minus: There’s nor code to persist on the micro-controller, and thus once we close our browser the screen stops displaying our tixy formula results. We needs a browser to control and send the value, all the creative coding part is actually done in the browser, which may limit the hacking aspect / fun? The micro-controller needs to store and serve the tixy page and code.

@juliendorra
Copy link
Author

First version of tixy for obgraensad led
https://github.com/juliendorra/ikea-led-obegraensad/tree/tixy

IMG_9861.-.crop.mp4

Demo at refresh period of 3s (lower crash the ESP, see below)

IMG_9865.mp4

This branch replace the whole front end with a single tixy page. Only the js file is modified compared to the official tixy.land site.

The web page then use the seb socket to send screen events with the whole screen.

At the moment the bottleneck is apparently the ESPAsyncWebServer server that cannot receive the data fast enough and crash.

@ph1p ph1p added the enhancement New feature or request label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants