A sketch for M5Stack Core2 .
m5core2_ancient_text_by_chatgpt is a program generate ancient document-like text for JRPG with ChatGPT API.
[日本語]
M5Stack Core2 用のスケッチです。
m5core2_ancient_text_by_chatgptは ChatGPT APIを使ってRPGの古文書風のテキストを生成するプログラムです。
-
Login to OpenAI API .
-
Click
Settings/Billingin the left sidebar. -
Click
Payment methods. -
Click
Add payment method. -
Fill the form.
-
Click
Add payment methodbutton. -
Click
API Keysin the left sidebar. -
Make sure key has created. If it does not exist, create it and copy it.
-
Clone the repository:
git clone https://github.com/cubic9com/m5core2_ancient_text_by_chatgpt.git cd m5core2_ancient_text_by_chatgpt -
Install Visual Studio Code if you haven't already.
-
Open the project using Visual Studio Code:
code . -
Change the
ssidvalue andpasswordvalue insrc/main.cppto match your network. -
Change the
chatgpt_secret_keyvalue insrc/main.cppto match your OpenAPI secret key. -
Install
PlatformIO IDEextension:- Go to the Extensions view (
Ctrl+Shift+X). - Search for
PlatformIO IDEand install it.
- Go to the Extensions view (
-
Open PlatformIO Home:
- In the left Activity Bar, click PlatformIO icon.
- In the left Primary Sidebar, go to
QUICK ACCESS > PIO Home > Open.
-
Open the project:
- In the right Editor Group, click
Open Projectin thePIO HOMEtab. - Select the cloned
m5core2_ancient_text_by_chatgptproject folder.
- In the right Editor Group, click
-
Build and upload the project:
- In the left Primary Sidebar, go to
PROJECT TASKS > m5stack-core2 > General > Upload.
- In the left Primary Sidebar, go to
[日本語]
-
OpenAI API にログインします。
-
左側のサイドバーで
Settings/Billingをクリックします。 -
Payment methodsをクリックします。 -
Add payment methodをクリックします。 -
フォームに必要事項を入力します。
-
Add payment methodボタンをクリックします。 -
左側のサイドバーで
API Keysをクリックします。 -
キーが作成されていることを確認します。存在しない場合は、新しく作成してコピーしてください。
-
リポジトリをクローンします:
git clone https://github.com/cubic9com/m5core2_ancient_text_by_chatgpt.git cd m5core2_ancient_text_by_chatgpt -
まだインストールしていない場合は、Visual Studio Code をインストールします。
-
Visual Studio Code でプロジェクトを開きます:
code . -
src/main.cpp内のssidの値とpasswordの値をあなたのネットワークに合わせて変更します. -
src/main.cpp内のchatgpt_secret_keyの値をあなたのOpenAIシークレットキーに合わせて変更します。 -
PlatformIO IDE拡張機能をインストールします:- 左サイドバーの「拡張機能」ビュー (
Ctrl+Shift+X) を開きます。 PlatformIO IDEを検索してインストールします。
- 左サイドバーの「拡張機能」ビュー (
-
PlatformIO Home を開きます:
- 左のアクティビティバーで PlatformIO アイコンをクリックします。
- 左のメインサイドバーから
QUICK ACCESS > PIO Home > Openを選択します。
-
プロジェクトを開きます:
- 右のエディターグループ内の
PIO HOMEタブでOpen Projectをクリックします。 - クローンした
m5core2_ancient_text_by_chatgptプロジェクトフォルダーを選択します。
- 右のエディターグループ内の
-
プロジェクトをビルド&アップロードします:
- 左のメインサイドバーから
PROJECT TASKS > m5stack-core2 > General > Uploadを選択します。
- 左のメインサイドバーから
Copyright (C) 2023-2025, cubic9com All rights reserved.
This project is licensed under the MIT license.
See the LICENSE file for details.
