GithubHelp home page GithubHelp logo

m5stickc-visiting-card's Introduction

M5StickC用 電子名刺

M5StickC用の電子名刺. アイコンやQRコードの表示が可能.

コミックマーケット98用に作成したArduinoスケッチを汎用化したもの.

M5StickC用 電子名刺

開発環境

操作方法

  • Aボタン
    • アイコン / QRコード 切り替え
  • Bボタン
    • バックライト輝度調整

表示内容の変更

名前, ID

m5stickc-visiting-card.ino の定数 name_string, id_string を編集する. efontを読み込むので日本語表示が可能.

    constexpr char* name_string = "名前";
    constexpr char* id_string = "@id";

スクロール文字

URLなどに使用. scroll-url.h の定数 string を編集する.

こちらはSpriteを使用している関係でefontで表示しておらず, 英数字のみ対応.

    static constexpr const char* string = "Scroll_URL";

QRコード

qr-state.h の定数 url を編集する. version = 2 では31バイトまで.

カメラの性能にもよるが, 64x64ドットでの表示のため読み取りはかなり厳しい. 周囲の明るさやフォーカスを合わせると読み取りに成功しやすい.

    static constexpr const char* url = "QR_URL";

アイコン

64x64ドットのPNG画像を用意しておく.

M5StickCはMicroSDカードスロットを持っていないため, 予め生バイナリに変換してソースコードに埋め込む必要がある.

意外とWindowsでも動作する生バイナリへの変換プログラムがなかったので, .NET Coreで変換処理を行う bmp2hex-dotnet-core を作成した. これを使用するとC/C++形式の配列データへ変換できる.

icon-image.h の配列値を置き換えたら完了.

constexpr const uint16_t icon_image[] = { (略) };

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.