NUCLEO-H743ZI2
入手先
x 研究調査目的で非営利、権利を侵害しない形で一部引用いたします。
電子工作のイメージ
(1ラインバッファ方式 8KB 2000ドットまでOK)
(データフォーマットは、y,x,16bit colorで4バイト)
(記事が前後して時間軸がおかしいけどちゃんと動いているよ)
●遊び方 とりま、Lチカ
x 特に詳細は、記述しない。
1.箱からだす。
2.USBケーブルを入手する
3.STM32CubeProgで接続確認
4.ST-LINKのファームのアップデート
5.Arduino IDEの起動
6.ボードの設定
7.スケッチの例からブリンク
8.PB14にLED3が接続されている(PB0 PE1 PB14)
●プログラム
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(PB14, OUTPUT); //PB0 PE1 PB14
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(PB14, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(PB14, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
===いきなり 時間をワープして===
(詳細は、以下省略)(いきなり Lチカからカラー液晶のデカ文字)
(ももクロ的に言うと いきなり、とばしすぎ)
カラー液晶の表示
つごうよく、ちょっといじった
変更箇所
ESP8266を外す
//定義
//#define ESP8266 1
#define SCREEN_WIDTH 128 // OLED display width, in pixels
設定1を有効化
///*
//GPIOの設定1 開始
//GPIO
#define GPIO_A0_P A0
設定3を無効化
/*
//GPIOの設定3 開始
//GPIO
#define GPIO_D32_P 32
・・・
*/
ダミーを入れる
//ESP8266の時
#if defined(ESP8266)
#define GPIO_0to31SET_REG *((volatile unsigned long *)GPIO_OUT_W1TS_REG)
#define GPIO_0to31CLR_REG *((volatile unsigned long *)GPIO_OUT_W1TC_REG)
#endif
//ESP8266じゃない時
#if !defined(ESP8266)
unsigned long pp_aaa;
unsigned long pp_bbb;
#define GPIO_0to31SET_REG pp_aaa
#define GPIO_0to31CLR_REG pp_bbb
#endif
入力を固定する
//char ch = pc_getc();
char ch=0x23;
元
変更後のソース