Comments (8)
Hello, @forstner-m
If the main unit type is Core2 v1.0, you can control the LED, but if it is v1.1, you cannot make detailed adjustments.
This is due to the difference in specifications between AXP192 and AXP2101.
As far as I have checked, it is working in v1.0. What model are you using?
IMG_0435.MOV
from m5unified.
I have a Core2 v1.0 and the led is not switchable. Do you have a code for this function?
from m5unified.
As a precaution, please update M5Unified & M5GFX library version to the latest released 0.1.13.
#include <M5Unified.h>
void setup(void)
{
auto cfg = M5.config();
cfg.led_brightness = 255;
M5.begin(cfg);
}
void loop(void)
{
M5.delay(1000);
M5.Power.setLed(0);
M5.delay(1000);
M5.Power.setLed(255);
}
If this doesn't work, please show me the program you tried that works with M5Core2.h
from m5unified.
Your code works, but this do not work:
#include <Arduino.h>
#include <M5GFX.h>
#include <M5Unified.h>
M5GFX display;
void setup(void)
{
auto cfg = M5.config();
cfg.led_brightness = 255;
M5.begin(cfg);
display.begin();
}
void loop(void)
{
while(1)
{
M5.delay(1000);
M5.Power.setLed(0);
M5.delay(1000);
M5.Power.setLed(255);
}
}
If the line "display.begin();" is active the LED is off.
from m5unified.
M5Unified includes M5GFX.
M5.Display is an instance of M5GFX.
You must not create your own instances of M5GFX.
Examples of such code are sometimes introduced, but they should be avoided as they can cause problems.
from m5unified.
Now it works! Is the line M5.Display.begin(); necessary?
It would still be good if an example were created with canvas. But with this line it works: M5Canvas canvas(&M5.Display);
from m5unified.
M5.Display.begin() is not required.
This is included in M5.begin().
from m5unified.
This ticket can be closed as resolved.
from m5unified.
Related Issues (20)
- Cracking sound on speaker using the "M5CoreS3-Esphome/voice-assistant" HOT 2
- Customised buttons HOT 1
- M5Capsule cannot be detected corretly HOT 2
- Setting text color on LCD prevents breaks text output HOT 1
- M5 Core2 v1.1 power LED HOT 1
- changing font HOT 2
- What does it do? AXP2101_Class::setReg0x20Bit0(bool flg) HOT 2
- How to use StickC Plus beeper buzzer HOT 2
- getVBUSVoltage not working with Core2 v1.1 HOT 3
- speaker on core 2 HOT 1
- M5Unified and Arduino 3.0 on Core2 HOT 2
- ADC cannot be used with M5Unified and Arduino3.0.4 HOT 1
- Play MP3 on cardputer HOT 1
- How to set MPU6886 Acceleromer/Gyro range and FIFO sample frequency?
- IDF 5.1/Arduino 3.0 support: legacy adc driver migration missing causing a boot crash if an ADC input is used HOT 4
- IDF 5.1/Arduino 3.0 support: M5.Speaker methods, camera input broken (CoreS3)
- M5Paper wakes too soon from deep sleep when touch wakeup is enabled - with solution HOT 2
- Minimalist configuration using M5Unified and BluetoothA2DPSink HOT 3
- M5CoreS3 speaker issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m5unified.