English/日本語
M5bit Less is a program which use Microbit More from M5Stack. It is written by the Arduino IDE.
I check devices work below, but not all of them support same Microbit More functions. I use M5Unified, so almost all M5Stack family can use. Please check a supported funciton table.
- M5Stack Basic
- M5Stack Gray
- M5Stack Core2
- M5StickC
- M5StickC Plus
- ATOM Matrix
- Cardputer
- Wio Terminal
- Gesture
- Connected and disconnected event block
- Acceleration input (need IMU)
- Display pattern
- Display text
- Play tone
- Sound level
- Button A, B event
- LOGO(Button C) event
- Light intensity
- Temperature
device | gesture | acceleration | display pattern | display text | play tone | sound level | button input | light intensity | temperature | Note |
---|---|---|---|---|---|---|---|---|---|---|
M5Stack Basic | -(IMU) | △IMU | o | o | o | x | A,B,C(LOGO) | x | △IMU | |
M5Stack Gray | - | o | o | o | o | x | A,B,C(LOGO) | x | o | |
M5Stack Core2 | o | o | o | o | o | x | A,B,C(LOGO) | x | o | |
M5StickC | o | o | o | o | x | o(With mic model) | A,B | x | o | |
M5StickC Plus | o | o | o | o | o | o | A,B | x | o | |
ATOM Matrix | o | o | o | △ | x | x | A | x | o | Too weak BLE |
CardPuter | x | x | o | o | o | o | A | x | x | |
Wio Terminal | o | o | o | o | o | o | A,B,C(LOGO) | o | o |
- △:Implementable
- -:Not check yet
Compile & download src/M5bit-less/M5bit-less.ino.
In M5Stack Core2, even if the compilation is successfully completed and downloaded, the initial screen may not be displayed and the program may not work. In this case, please try disabling PSRAM in Tools->PSRAM.
Microbit More can be used as an extension in stretch3.
Click on the bottom left button to add the extension.
Add the Microbit More extension.
Select a device to connect.
You can use like a Microbit More for micro:bit.
M5bitLess label & data extension can send and receive special data between Scratch and M5Stack.
For now, commands for screen drawing are implemented.
label | meanings | value |
---|---|---|
label | show label & data | 0:not show(default)、other:show |
led | on/off of LED | 'on':on, other:off |
x0,y0,x1,y1,x2,y2 | location(x,y) | int |
w,h | width & height | int |
r | radius | int |
c | color(24bit) | int |
xc,yc | location of string | int |
str | string to show | string |
size | size of character | int(1-7) |
tc | color of string(16bit) | int |
cmd | draw command (show below) | string |
The following commands for screen drawing are available.
value of cmd | meanings | command |
---|---|---|
drawPixel | draw point | M5.Lcd.drawPixel(x0, y0, c) |
drawLine | draw line | M5.Lcd.drawLine(x0, y0, x1, y1, c) |
drawRect | draw rectangle | M5.Lcd.drawRect(x0, y0, w, h, c) |
drawTriangl | draw triangle | M5.Lcd.drawTriangle(x0, y0, x1, y1, x2, y2, c) |
drawRoundRe | draw corner rounded rectangle | M5.Lcd.drawRoundRect(x0, y0, w, h, r, c) |
fillScreen | fill full screen with a color | M5.Lcd.fillScreen(c) |
fillRect | draw filled rectangle | M5.Lcd.fillRect(x0, y0, w, h, c) |
fillCircle | draw filled circle | M5.Lcd.fillCircle(x0, y0, r, c) |
fillTriangl | draw filled triangle | M5.Lcd.fillTriangle(x0, y0, x1, y1, x2, y2, c) |
fillRoundRe | draw filled corner rounded rectangle | M5.Lcd.fillRoundRect(x0, y0, w, h, r, c) |
draw string | M5.Lcd.setCursor(xc, yc);M5.Lcd.setTextColor(tc);M5.Lcd.setTextSize(size);M5.Lcd.print(str) |
For now, the following keyboard inputs are available.
These value is reserved.
label | meanings | value |
---|---|---|
Key | character code with Faces keyboard | 'a', 'b', 'A', ... |
a | Random string 'a'-'z' | 'a', 'b', 'c', ... |
The following items can be implemented, but have not yet been implemented.
- Pin 0-2 I/O(GPIO, PWM, ADC, Servo, ...)
The following items have not been implemented because there are no sensors compatible with the M5Stack.
- Light sensor (Implemented at Wio Terminal)
- Functions related to magnetic force (include heading, ...): (Implementable at M5Stack Gray)
- Mic input (Inplemantable at M5StickC/Plus and Core2)