release v0.4.5

This commit is contained in:
sean
2023-08-28 14:50:34 +08:00
parent fc1e5a78d7
commit 1e81176b2d
6 changed files with 5 additions and 97 deletions
@@ -1,14 +1,6 @@
/*
Before compile this example, you have to change line 28 of the ESP32 core's
Server.h from: "virtual void begin(uint16_t port=0) =0;" To: "virtual void
begin() =0;" But that will break anything that uses the ESP32 WiFi library's
WebServer class.
Reference link:
https://community.m5stack.com/topic/3068/lan-module-w5500-with-poe-compilation-error
*/
#include <M5Stack.h>
#include <SPI.h>
#include <Ethernet.h>
#include <M5_Ethernet.h>
#define SCK 18
#define MISO 19
#define MOSI 23
Binary file not shown.
@@ -1,14 +1,6 @@
/*
Before compile this example, you have to change line 28 of the ESP32 core's
Server.h from: "virtual void begin(uint16_t port=0) =0;" To: "virtual void
begin() =0;" But that will break anything that uses the ESP32 WiFi library's
WebServer class.
Reference link:
https://community.m5stack.com/topic/3068/lan-module-w5500-with-poe-compilation-error
*/
#include <M5Stack.h>
#include <SPI.h>
#include <Ethernet.h>
#include <M5_Ethernet.h>
#define SCK 18
#define MISO 19
#define MOSI 23
-76
View File
@@ -1,76 +0,0 @@
/*
Description: Use UART communication to control the LED matrix on microbit.
*/
#include <M5Stack.h>
#define WIDTH 320
#define HEIGHT 240
#define BLOCK_SIZE 40
#define UNIT_WIDTH 5
#define UNIT_HEIGHT 5
#define UNIT_SIZE 25
#define GETX(i) ((i) % (5))
#define GETY(i) ((i) / (5))
int world[UNIT_SIZE];
int i;
void setup() {
M5.begin();
M5.Power.begin();
Wire.begin();
if (digitalRead(BUTTON_A_PIN) == 0) {
Serial.println("Will load menu binary");
updateFromFS(SD);
ESP.restart();
}
Serial2.begin(115200, SERIAL_8N1, 16, 17);
M5.Lcd.fillScreen(BLACK);
M5.Lcd.setTextSize(2);
M5.Lcd.setCursor(35, 220);
M5.Lcd.println(" < * >");
for (i = 0; i < UNIT_SIZE; i++) {
world[i] = 0;
}
i = UNIT_SIZE / 2;
}
void loop() {
M5.update();
int x = GETX(i) + 1;
int y = GETY(i);
if (world[i] > 0)
M5.Lcd.fillRect(x * BLOCK_SIZE + 1, y * BLOCK_SIZE + 1, BLOCK_SIZE - 2,
BLOCK_SIZE - 2, LIGHTGREY);
else
M5.Lcd.fillRect(x * BLOCK_SIZE + 1, y * BLOCK_SIZE + 1, BLOCK_SIZE - 2,
BLOCK_SIZE - 2, BLUE);
if (M5.BtnC.wasPressed()) {
if (world[i] > 0)
M5.Lcd.fillRect(x * BLOCK_SIZE + 1, y * BLOCK_SIZE + 1,
BLOCK_SIZE - 2, BLOCK_SIZE - 2, WHITE);
else
M5.Lcd.fillRect(x * BLOCK_SIZE, y * BLOCK_SIZE, BLOCK_SIZE,
BLOCK_SIZE, BLACK);
++i;
if (i >= UNIT_SIZE) i = 0;
}
if (M5.BtnA.wasPressed()) {
if (world[i] > 0)
M5.Lcd.fillRect(x * BLOCK_SIZE + 1, y * BLOCK_SIZE + 1,
BLOCK_SIZE - 2, BLOCK_SIZE - 2, WHITE);
else
M5.Lcd.fillRect(x * BLOCK_SIZE, y * BLOCK_SIZE, BLOCK_SIZE,
BLOCK_SIZE, BLACK);
--i;
if (i < 0) i = UNIT_SIZE - 1;
}
if (M5.BtnB.wasPressed()) {
if (world[i] > 0)
world[i] = 0;
else
world[i] = 1;
Serial2.print(world[i]);
Serial2.print(GETX(i));
Serial2.println(GETY(i));
}
}
+1 -1
View File
@@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/m5stack/m5stack.git"
},
"version": "0.4.4",
"version": "0.4.5",
"frameworks": "arduino",
"platforms": "espressif32",
"headers": "M5Stack.h"
+2 -2
View File
@@ -1,5 +1,5 @@
name=M5Stack
version=0.4.4
version=0.4.5
author=M5Stack
maintainer=M5Stack
sentence=Library for M5Stack Core development kit
@@ -8,4 +8,4 @@ category=Device Control
url=https://github.com/m5stack/m5stack
architectures=esp32
includes=M5Stack.h
depends=M5Family,M5Module-4Relay,MODULE_GRBL13.2,Ethernet2
depends=M5Family,M5Module-4Relay,MODULE_GRBL13.2,M5_BMM150