From 5f76d4471da7982c65b7d8042c3ac13874f6c97e Mon Sep 17 00:00:00 2001 From: Forairaaaaa Date: Tue, 14 Feb 2023 10:20:19 +0800 Subject: [PATCH] rename --- README.md | 8 ++++---- .../Core2forAWS/image_file/examples/AWS_IoT_connect.py | 6 +++--- ports/esp32/boards/Core2forAWS/image_file/examples/mic.py | 2 +- ports/esp32/boards/Core2forAWS/image_file/examples/tft.py | 8 ++++---- .../esp32/boards/Core2forAWS/image_file/examples/touch.py | 2 +- .../boards/Core2forAWS/image_file/examples/wav_player.py | 2 +- .../boards/Core2forAWS/modules/{Edukit.py => Kit.py} | 0 7 files changed, 14 insertions(+), 14 deletions(-) rename ports/esp32/boards/Core2forAWS/modules/{Edukit.py => Kit.py} (100%) diff --git a/README.md b/README.md index f7cd5dc0a..a7d06f83a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# M5Stack Core2 for AWS IoT EduKit MicroPython Examples +# M5Stack Core2 for AWS IoT Kit MicroPython Examples _NOTE:_ This repo is limited in functionality, and is a result of customer requests to have an AWS IoT referenceable example utilizing the ATECC608 in MicroPython. For more complete set of MicroPython functionality, we recommend using M5Stack's UIFlow tool. Community contributions are welcome. ## Cloning @@ -27,7 +27,7 @@ git submodule update --init --recursive ``` ## General Setup and Usage -To use this repository on the [M5Stack Core2 for AWS IoT EduKit](https://m5stack.com/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit), you must have the [ESP-IDF release v4.2](https://github.com/espressif/esp-idf/tree/release/v4.2) installed first. You can find the installation instructions on [Espressif's Documentation](https://docs.espressif.com/projects/esp-idf/en/release-v4.2/esp32/get-started/index.html#installation-step-by-step). With the ESP-IDF tools added to your path, you can follow the steps below to run the various examples provided in this repository. +To use this repository on the [M5Stack Core2 for AWS IoT Kit](https://m5stack.com/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit), you must have the [ESP-IDF release v4.2](https://github.com/espressif/esp-idf/tree/release/v4.2) installed first. You can find the installation instructions on [Espressif's Documentation](https://docs.espressif.com/projects/esp-idf/en/release-v4.2/esp32/get-started/index.html#installation-step-by-step). With the ESP-IDF tools added to your path, you can follow the steps below to run the various examples provided in this repository. ## Compiling the MicroPython cross-compiler, mpy-cross @@ -90,7 +90,7 @@ execfile("examples/<>.py") ## Running the AWS IoT Connectivity Example ### Prerequisites -In order to run the example, you will need to first have the device registered to your AWS account with the required policy attached to the thing, and your AWS IoT mqtt host endpoint address. It's recommended you complete the following AWS IoT EduKit tutorials first so you have everything setup: +In order to run the example, you will need to first have the device registered to your AWS account with the required policy attached to the thing, and your AWS IoT mqtt host endpoint address. It's recommended you complete the following AWS IoT Kit tutorials first so you have everything setup: 1) [Getting Started](https://edukit.workshop.aws/en/getting-started.html) 2) [Cloud Connected Blinky](https://edukit.workshop.aws/en/blinky-hello-world.html) @@ -128,7 +128,7 @@ execfile("examples/AWS_IoT_connect.py") ## Clean up To save power, bandwidth, and avoid unexpected AWS charges, it is always good to shut off usage of resources. You can either hold the power button for 6-seconds to shut off the device, or erase the flash memory. -_NOTE:_ Erasing the flash memory will cause the device to make a "ticking" sound as it constantly restarts itself due to not having an application to run. To avoid this, it is recommended you upload the [factory firmware](https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/tree/master/Factory-Firmware). +_NOTE:_ Erasing the flash memory will cause the device to make a "ticking" sound as it constantly restarts itself due to not having an application to run. To avoid this, it is recommended you upload the [factory firmware](https://github.com/m5stack/Core2-for-AWS-IoT-Kit/tree/master/Factory-Firmware). To erase the flash memory, you can use the configured make operation "erase": diff --git a/ports/esp32/boards/Core2forAWS/image_file/examples/AWS_IoT_connect.py b/ports/esp32/boards/Core2forAWS/image_file/examples/AWS_IoT_connect.py index 4b65a10fa..1e5f17e37 100644 --- a/ports/esp32/boards/Core2forAWS/image_file/examples/AWS_IoT_connect.py +++ b/ports/esp32/boards/Core2forAWS/image_file/examples/AWS_IoT_connect.py @@ -1,8 +1,8 @@ -# AWS IoT connectivity example in MicroPython for the M5Stack Core2 for AWS IoT EduKit +# AWS IoT connectivity example in MicroPython for the M5Stack Core2 for AWS IoT Kit # This example uses the ESP32 to connect to AWS IoT Core using the attached ATECC608 # Trust&GO secure element for establishing a secure TLS connection. # -# Prerequisite — This example assumes you have completed the AWS IoT EduKit tutorials +# Prerequisite — This example assumes you have completed the AWS IoT Kit tutorials # 1) Getting Started # 2) Cloud Connected Blinky / Hello World # @@ -54,7 +54,7 @@ def sub_cb(topic, msg): def aws_iot_publish(): pub_topic = client_id + "/" print("Publishing to topic", pub_topic) - mqtt_client.publish(pub_topic, json.dumps({"message": "Hello World", "device_type": "Core2 for AWS IoT Edukit"}), qos=0) + mqtt_client.publish(pub_topic, json.dumps({"message": "Hello World", "device_type": "Core2 for AWS IoT Kit"}), qos=0) def aws_iot_subscribe(): sub_topic = client_id + "/#" diff --git a/ports/esp32/boards/Core2forAWS/image_file/examples/mic.py b/ports/esp32/boards/Core2forAWS/image_file/examples/mic.py index 8a6c3f2a1..b9a7b8b7d 100644 --- a/ports/esp32/boards/Core2forAWS/image_file/examples/mic.py +++ b/ports/esp32/boards/Core2forAWS/image_file/examples/mic.py @@ -1,6 +1,6 @@ from machine import Pin from M5Library import I2S -from Edukit import lcd +from Kit import lcd import struct import time diff --git a/ports/esp32/boards/Core2forAWS/image_file/examples/tft.py b/ports/esp32/boards/Core2forAWS/image_file/examples/tft.py index 9f99154ac..ccae6882c 100644 --- a/ports/esp32/boards/Core2forAWS/image_file/examples/tft.py +++ b/ports/esp32/boards/Core2forAWS/image_file/examples/tft.py @@ -1,4 +1,4 @@ -from Edukit import lcd +from Kit import lcd import time lcd.fillScreen(lcd.BLACK) @@ -7,7 +7,7 @@ for datum in range(9): lcd.fillScreen(lcd.BLACK) lcd.font(lcd.FONT_DejaVu26) - lcd.text(160, 120, "AWS IoT EduKit", lcd.WHITE, bgcolor=lcd.WHITE, textdatum=datum) + lcd.text(160, 120, "AWS IoT Kit", lcd.WHITE, bgcolor=lcd.WHITE, textdatum=datum) lcd.drawCircle(160, 120, 5, lcd.GREEN) lcd.drawPixel(160, 120, lcd.GREEN) @@ -15,7 +15,7 @@ for datum in range(9): lcd.font(lcd.FONT_DejaVu26) lcd.setColor(lcd.BLUE, lcd.BLACK) -lcd.text(160, 120, "Core2 for AWS IoT EduKit", textdatum=lcd.DATUM_MC) +lcd.text(160, 120, "Core2 for AWS IoT Kit", textdatum=lcd.DATUM_MC) lcd.font(lcd.FONT_DejaVu14) lcd.drawCircle(160, 120, 5, lcd.GREEN) @@ -24,7 +24,7 @@ lcd.drawPixel(160, 120, lcd.GREEN) lcd.setCursor(0, 0) for i in range(6): lcd.font(i) - lcd.print('EduKit') + lcd.print('Kit') time.sleep(0.2) lcd.font(lcd.FONT_DejaVu14) diff --git a/ports/esp32/boards/Core2forAWS/image_file/examples/touch.py b/ports/esp32/boards/Core2forAWS/image_file/examples/touch.py index 5e6d4f89a..21c7bd5e5 100644 --- a/ports/esp32/boards/Core2forAWS/image_file/examples/touch.py +++ b/ports/esp32/boards/Core2forAWS/image_file/examples/touch.py @@ -1,4 +1,4 @@ -from Edukit import btn_left, touch +from Kit import btn_left, touch import time while True: diff --git a/ports/esp32/boards/Core2forAWS/image_file/examples/wav_player.py b/ports/esp32/boards/Core2forAWS/image_file/examples/wav_player.py index 78cdcb0b2..1270341af 100644 --- a/ports/esp32/boards/Core2forAWS/image_file/examples/wav_player.py +++ b/ports/esp32/boards/Core2forAWS/image_file/examples/wav_player.py @@ -1,6 +1,6 @@ from M5Library import I2S from machine import Pin -from Edukit import pmu +from Kit import pmu import io BCK_PIN = Pin(12) diff --git a/ports/esp32/boards/Core2forAWS/modules/Edukit.py b/ports/esp32/boards/Core2forAWS/modules/Kit.py similarity index 100% rename from ports/esp32/boards/Core2forAWS/modules/Edukit.py rename to ports/esp32/boards/Core2forAWS/modules/Kit.py