1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

いなたつAdvent Calendar 2019

Day 17

【備忘録】M5Stick V の液晶の向きを正しくする

Last updated at Posted at 2019-12-17

はじめに

いなたつアドカレの十七日目の記事です。

M5StickVを触った時に画面の向きが逆で困ったので、対処法の備忘録。

じっそ〜

m5stick.py
import lcd

lcd.direction(lcd.YX_LRUD) # カメラの向きなどの設定 YX

lcdは(Liquid Crystal Display)の制御を行うlcdをimportしdirectionで向きの制御を行うことができます。

M5StickVはデフォルトでの向きだと反転しているため、向きの指定が必要となります。

結論を言うとlcd.YX_LRUDを指定すると向きがカメラと一致します。

YX_LRUDはそれぞれ

  • YX:座標軸の向きの設定
  • LR:左右(Left,Right)の向きの設定
  • UD:上下(Up,Down)の向きの設定

を表しています。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?