M5Stack Core2
https://gyazo.com/c307e289e92ee982f2511f1283ca9bf8 https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit
ドキュメント
M5Stack's New Device CORE2 Draws Attention to Its Touch Screen Display
FAQもある
M5Stack Core2用Arudino IDE 開発ガイド
ボードマネージャに以下を追加する
https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
ライブラリをインストールする
https://gyazo.com/32b19b8660294d83616efe2389e7cc89
/icons/github.iconファームウエアのソース
/icons/github.icon
https://gyazo.com/9c09a354471bfd9f53356f8584cebb88
裏ぶたを止めてるネジは2.0mmの6角ネジ
2本ずつで長さが違う
リポの向きが90度違っていてコネクタに当たっている
https://twitter.com/ushineko3n/status/1301387375541514240
全数じゃないかという話
https://twitter.com/ushineko3n/status/1301403317839380481
Core2FactoryTestのビープ音がうるさい
sytState.soundFlagをデフォルトでfalseにする
code:Core2FactoryTest
255: struct systemState
256: {
...
246: bool soundFlag = false;
bibiSigの値を0.5倍にする
M5Core2.begin()の引数
void begin(bool LCDEnable = true, bool SDEnable = true, bool SerialEnable = true, bool I2CEnable = false);
https://github.com/m5stack/M5Core2/blob/master/src/M5Core2.h#L86
Core2FactoryTestをソースから入れるとAxp192が見つからない
I2Cにぶらさがっているものが全部見つからない
M5Stack Core2のソースではWire1を使っているが,Core2FactoryTestではWireを使っているため
https://github.com/m5stack/M5Core2/blob/master/src/AXP192.cpp
code:AXP192.cpp
7: void AXP192::begin(void)
8: {
9:
10: Wire1.begin(21, 22);
11: Wire1.setClock(400000);
https://github.com/m5stack/M5-ProductExampleCodes/blob/master/Core/M5Core2/Arduino/Core2_Factory_test/Core2_Factory_test.ino
code:Core2_Factory_test.ino
439: int checkI2cAddr()
440: {
441: uint8_t count = 0;
442: i2cDevice_t *lastptr = &i2cParentptr;
443: do{
444: lastptr = lastptr->nextPtr;
445: Serial.printf("Addr:0x%02X - Name:%s\r\n",lastptr->addr,lastptr->Name.c_str());
446: Wire.beginTransmission( lastptr->addr ); // ここと
447: if ( Wire.endTransmission() == 0 ) // ここ
scani2caddr()にもあるけど呼ばれてない
code:scani2caddr
397: int scani2caddr()
398: {
399: for (int i = 0; i < 120; i++)
400: {
401: Wire.beginTransmission(i); // ここと
402: if (Wire.endTransmission() == 0) // ここ
The pin definition of Wire.begin in M5Core2.cpp is in conflict · Issue #2 · m5stack/M5Core2
Issueが上がったので直る?
xQueueSend
https://www.freertos.org/a00117.html
BaseType_t xQueueSend(QueueHandle_t xQueue, const void * pvItemToQueue, TickType_t xTicksToWait);
タッチの取り方
https://github.com/m5stack/M5Core2/blob/master/src/touch.h
画面サイズ
320x280
code:screen
0 320
+----------------------------------+ 0
| |
| |
| | 120
| |
| |
+----------------------------------+ 241
| |
+----------------------------------+ 280
UIFlowで画面をタッチしたときに再描画させたくない
IAMLIUBO(/icons/twitter.icon@its_hard_2_name)さんに教えてもらった
If you just want disable screen refresh, try this function:
lv.obj.set_click(lv.scr_act(), False)
It should be works!
https://twitter.com/its_hard_2_name/status/1303529621510471680
「コードを実行」ブロックでlv.obj.set_click(lv.scr_act(), False)を入れる
https://gyazo.com/69025d1d508c448706b1a8e2b1864c48
#m5stack