Skip to content

thorv/Versawriter_main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Versawriter_Prototype main project

Hand-held Versa Writer (Persistent Of Vision) using M5Atom matrix or M5Stick-C

  • CPU: M5Atom matrix or M5Stick-C (ESP32 + IMU MPU6886)

  • LEDs: NeoPixel type 72 LEDs TAPE

    • (I intend to make it easy to change the number and type of LEDs, but I have not confirmed it.)
  • LED Driver library: FastLED

  • Connection:
    Battery(4.5~6V) <--> LED Vcc <--> M5 Atom 5V in

    • (M5Stick-C should use internal battery)

    LED Control Pin <--> M5Atom G32 / M5Stick-C G33 (Grove connector 1pin)
    GNDs should be connected each other.

Overview

This is a Versa Writer program that uses ESP32 and an accelerometer. You can draw a picture in the space by sequentially sending the preset image and the pattern generated by the program to the LED.

The time is synchronized between the CPU units by "ESP now" communication. If you start multiple CPU units within the reach of communication, the communication will be linked automatically. The LED show program starts by pressing a button on any one CPU unit. The CPU unit for which the button is pressed becomes the "master unit" thereafter. If you press the button on the master unit again, the programs of all connected CPU units will return to the beginning (time = 0). You cannot change the operating master unit. If you want to change it, turn off the power of the current master unit and the CPU unit to be the master unit in the future, turn it on again, and press the button of the CPU unit to be the master unit.

You can set the lighting pattern switching for each unit in time (milliseconds). The lighting pattern switching setting is made using the storyBoard variable (array of story structures) in pattern.cpp. Each lighting pattern is implemented as a class that inherits the Pattern class. The Pattern :: getLed () function is called periodically, and the time, the number of calls from the start of the pattern, the data of the accelerometer, etc. are displayed. Since it is passed as an argument, create a lighting pattern as appropriate.
I'm trying to implement some classes.

  • SimplePattern class that repeatedly displays the specified image
  • Wave class whose pattern changes on the waves
  • Gradation class that changes color
  • Hit1, Hit2 class that generates a pattern by hitting the device
  • I'm trying to draw an image in synchronization with shaking the entire device left and right by hand,
    but the tracking performance is not good. (Versawrite class)

Related tools are also under construction.

Note: Comments in the program are written in Japanese.

概要

ESP32と加速度センサーを用いたバーサライタのプログラムです。 予め設定した画像や、プログラムで生成したパターンをLEDに順次送出することで空間に絵を描くことができます。

CPUユニット間は"ESP now"通信で時刻が同期されます。 通信が届く範囲で複数のCPUユニットを始動すると、自動的に通信がリンクします。 LEDショープログラムは、どれかひとつのCPUユニットのボタンを押すことで開始します。 ボタンを押したCPUユニットが以降「親機」となります。親機のボタンを再度押すと、プログラムが最初(時刻=0)に戻ります。動作中の親機の変更はできないので、変更したい場合は一旦全てのCPUユニットの電源を切ってください。

各ユニットには、時刻(ミリ秒単位)で点灯パターンの切り替えを設定することができます。 点灯パターンの切り替え設定は、pattern.cppのstoryBoard (story構造体の配列)で行います。 個々の点灯パターンはPatternクラスを敬称したクラスとして実装します。Pattern::getLed()関数は定期的に呼び出され、時刻、パターン開始からの呼び出し回数、加速度センサーのデータ等が渡されますので、適宜点灯パターンを作成してください。
いくつかのクラスについて実装してみています。 いくつかのクラスについて実装してみています。

  • 指定画像を繰り返し表示するSimplePatternクラス
  • 波上にパターンが変化するWaveクラス
  • 色が変化するGradation クラス
  • 装置を叩くことでパターンを発生するHit1, Hit2クラス
  • 装置全体を手で左右に振ることに同期して画を描くことも試行してみていますが、今一つ追従性能がよくありません。(Versawriteクラス)

関連するツールも作成中です。

(5/May/2022)

About

Versawriter(POV) using M5Stick_C/M5Atom_Matrix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published