Works. Thank you!
Posts made by M95D
-
RE: I can't access forum.m5stack.com from my location
No, it's not just the forum. docs.m5stack.com doesn't work.
The site won't reply to ping. It's a network problem. -
I can't access forum.m5stack.com from my location
Hi.
I'm having trouble accessing these websites:
docs.m5stack.com
forum.m5stack.com
community.m5stack.comI live in Romania. I tried broadband internet connection and mobile phone.
Ping doesn't work.
DNS resolves to 120.77.157.90 for all of them.
Traceroute:C:\>tracert 120.77.157.90 Tracing route to 120.77.157.90 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 172.27.143.1 (my router) 2 1 ms <1 ms <1 ms 10.0.0.1 3 10 ms 2 ms 1 ms 10.240.6.129 4 8 ms 9 ms 8 ms 10.220.149.27 5 8 ms 8 ms 8 ms ae7-2345.cr0-buc1.ip4.gtt.net [87.119.98.153] 6 * * * Request timed out. 7 43 ms 43 ms 43 ms ip4.gtt.net [154.14.32.238] 8 254 ms 255 ms 255 ms 202.97.95.158 9 235 ms 235 ms 235 ms 202.97.91.193 10 * * * Request timed out. 11 * * * Request timed out. 12 * * * Request timed out.
m5stack.com (the main site) works, but that's a very different IP: 23.227.38.32.
The only way I could enter this forum was to use TOR, but even that didn't work very well. There were lots of timeouts.
Can you investigate?
Thanks! -
M5.Axp.ScreenBreath() crashes when used in interrupt
Hi.
It seems that M5.Axp.ScreenBreath() crashes when it is used in a interrupt. Try the demo below in Arduino IDE. It should turn off the display after a timer delay and turn it back on when the button is pressed.
On my system this program crashes with a watchdog timeout during i2c operation.#include <M5StickC.h> //define M5StickC hardware components and functions #define BUTTON_MAIN 37 //The main button pin number #define SCREEN_TIMEOUT 10 //Screen-off timeout in seconds hw_timer_t *timer; void IRAM_ATTR onButton() { //Interrupt on button press => turn on the screen detachInterrupt(BUTTON_MAIN); //Ignore more button presses M5.Axp.ScreenBreath(10); //Set screen light ON timerAlarmEnable(timer); //Start timer for screen-off delay } void IRAM_ATTR onTimer(){ //Interrupt on timer => turn off the screen timerAlarmDisable(timer); //Stop the timer. M5.Axp.ScreenBreath(0); //Set screen light OFF attachInterrupt(BUTTON_MAIN,onButton,FALLING); //Attach interrupt on button press => turn on the screen } void setup() { M5.begin(); //Init M5 M5.Lcd.fillScreen(YELLOW); //Make screen yellow pinMode(BUTTON_MAIN, INPUT_PULLUP); //Button GPIO set as input, pull-up enabled timer=timerBegin(1,40000,true); //Init screen light timer, divisor 40000 => 0.5ms steps timerAttachInterrupt(timer,&onTimer,true); //Set screen light timer interrupt function timerAlarmWrite(timer,SCREEN_TIMEOUT*2000,true); //Set interrupt to turn off screen after X timer steps of 0.5ms each. timerAlarmEnable(timer); //Start timer for screen-off delay } void loop() { //No code here. }
-
M5.Axp.ScreenBreath() crashes when used in interrupt
Hi.
It seems that M5.Axp.ScreenBreath() crashes when it is used in a interrupt. Try the demo below in Arduino IDE. It should turn off the display after a timer delay and turn it back on when the button is pressed.
On my system this program crashes with a watchdog timeout during i2c operation.#include <M5StickC.h> //define M5StickC hardware components and functions #define BUTTON_MAIN 37 //The main button pin number #define SCREEN_TIMEOUT 10 //Screen-off timeout in seconds hw_timer_t *timer; void IRAM_ATTR onButton() { //Interrupt on button press => turn on the screen detachInterrupt(BUTTON_MAIN); //Ignore more button presses M5.Axp.ScreenBreath(10); //Set screen light ON timerAlarmEnable(timer); //Start timer for screen-off delay } void IRAM_ATTR onTimer(){ //Interrupt on timer => turn off the screen timerAlarmDisable(timer); //Stop the timer. M5.Axp.ScreenBreath(0); //Set screen light OFF attachInterrupt(BUTTON_MAIN,onButton,FALLING); //Attach interrupt on button press => turn on the screen } void setup() { M5.begin(); //Init M5 M5.Lcd.fillScreen(YELLOW); //Make screen yellow pinMode(BUTTON_MAIN, INPUT_PULLUP); //Button GPIO set as input, pull-up enabled timer=timerBegin(1,40000,true); //Init screen light timer, divisor 40000 => 0.5ms steps timerAttachInterrupt(timer,&onTimer,true); //Set screen light timer interrupt function timerAlarmWrite(timer,SCREEN_TIMEOUT*2000,true); //Set interrupt to turn off screen after X timer steps of 0.5ms each. timerAlarmEnable(timer); //Start timer for screen-off delay } void loop() { //No code here. }
-
M5.Axp.ScreenBreath() hangs when used in interrupt
It seems that M5.Axp.ScreenBreath() hangs when it is used in a interrupt.
The demo below should turn off the screen after a timer delay and turn it back on when the button is pressed. Run it in Arduino IDE.
On my system, this program crashes with a watchdog timeout during i2c operation. See it in serial log.#include <M5StickC.h> #define BUTTON_MAIN 37 //The main button pin number #define SCREEN_TIMEOUT 10 //Screen-off timeout in seconds hw_timer_t *timer; //Screen-off timer void IRAM_ATTR onButton() { //Interrupt on button press => turn on the screen detachInterrupt(BUTTON_MAIN); //Ignore more button presses M5.Axp.ScreenBreath(10); //Set screen light ON timerAlarmEnable(timer); //Start timer for screen-off delay } void IRAM_ATTR onTimer(){ //Interrupt on timer => turn off the screen timerAlarmDisable(timer); //Stop the timer. M5.Axp.ScreenBreath(0); //Set screen light OFF attachInterrupt(BUTTON_MAIN,onButton,FALLING); //Attach interrupt on button press => turn on the screen } void setup() { M5.begin(); //Init M5. Start with screen ON. M5.Lcd.fillScreen(YELLOW); //Make screen yellow pinMode(BUTTON_MAIN, INPUT_PULLUP); //Button GPIO set as input, pull-up enabled timer=timerBegin(1,40000,true); //Init screen light timer, divisor 40000 => 0.5ms steps timerAttachInterrupt(timer,&onTimer,true); //Set screen light timer interrupt function timerAlarmWrite(timer,SCREEN_TIMEOUT*2000,true); //Set interrupt to turn off screen after X timer steps of 0.5ms each. timerAlarmEnable(timer); //Start timer for screen-off delay } void loop() { //No code here. }