Slow response could be down to having the wrong baud speed set. UIFlow is built on Micropython and so does support multi files like arduino. Checkout Micropython. Org
Esp is not like the arduino as instead of having functions permanently assigned to a pin, the esp using a matrix to assign functions to pins
Can confirm the m5stack core2 aws iot edukit edition suffers this same behavior.
I don't trust myself to do the tiny soldering, this is incredibly disappointing.
Thanks! That workaround works.
You only see the brief flash when applying power or when the IDE uploads the code and hard resets via RTS.
If you do this:
#include <M5StickCPlus.h>
void setup() {
M5.begin();
digitalWrite (M5_LED, HIGH); // turn off the LED
pinMode(M5_LED, OUTPUT);
digitalWrite (M5_LED, HIGH); // off
}
void loop() {
delay(10);
ESP.restart();
}
the LED does not flash repeatedly.
Danke für Deinen Vorschlag, werde ich mal probieren.
Ich habe es gestern doch noch mit dem PIR versucht, da dieser nur beim Auschalten eine Verzögerung von 2 Sekunden hat. Wenn der PIR auf "0" ist und er eine Bewegung erkennt, so reagiert er in meinen ersten Tests unverzögert.
Bei der Programmierung meiner Zeitmessung in Kombination mit dem PIR, reagiert dieser aber leider dennoch verzögert beim starten des Timers. Hat jemand eine Idee weshalb das so ist? Anbei ein Bild Tests:
Hey all! A while back I purchased the M5Core2 and the FACES Keyboard kit, and I noticed that the keyboard only works when I use UIFlow, and it doesn't work when I program the device using the Arduino IDE. Here's my code so far:
#include <M5Core2.h>
uint8_t getKey() {
Wire.requestFrom(0x08, 1);
uint8_t o = Wire.read();
return o;
}
void setup() {
M5.begin(true, true, true, true);
Wire.begin();//21, 22);
M5.Lcd.print("Keyboard test");
}
void loop() {
uint8_t key = getKey();
if (key != 0) {
M5.Lcd.print("Key pressed: ");
M5.Lcd.print(key);
} else {
M5.Lcd.print(".");
}
delay(2);
}
Does anyone know what I'm doing wrong?
I cannot confirm this works with 1.9.7. Connected successfully but fails when trying to subscribe topic data sent to hivemq and appearing in my clusters webclient.
I have downloaded that and it does work.
But, your documentation leaves so much to be desired / it would be great if this could be documented somewhere rather than in a git repo.
Some of us do read documentation / and don't necessarily consider git to be documentation.
Hello @DavidoZ
why don't you try the provided example?
Strictly Serial.begin() isn't needed in setup() as M5.begin() already takes care of that. And for the communication with the SIM7600 you'll need to open Serial2. See above example.
Thanks
Felix
Hello @thkfighter
if you're asking whether there are people using M5Stack Basic Core successfully with UIFlow then the answer is yes and no. I am sure there are many successful cases out there but there probably are some unsuccessful cases as well. For M5Stack Basic Core resetting every few seconds many reasons come to mind: weak power supply, UIFlow firmware not properly burned, incorrect UIFlow firmware, WiFi credentials incorrect, weak WiFi signal and yes, faulty hardware.
Without a little more information it is very hard to diagnose the particular issue your M5Stack Basic Core is suffering from. Could you give a little more information? For instance is there anything in M5Burner log? Is there anything on the screen? If yes, does the WiFi symbol turn from red to green?
Thanks
Felix
Hello @alexylem
only so called RTC_GPIOs can wake ESP32 from deep sleep. Unfortunately GPIO_NUM_5 is not one of them.
Please check out page 15 - Pin description of the ESP32 datasheet.
Thanks
Felix
Hello guys
there is a new version, M5Paper V1.1, available in the M5Stack store. It seems to be more or less identical with the original version, maybe except for the e-Ink screen panel?
Does anyone understand below comment from the M5Paper product description?
'M5Paper v1.1 adopts flexible e-Ink screen panel, which is the same model as that of M5Paper v1.0 hard e-Ink screen panel. All features and specs are the same for both models.'
Is the new and old version actually the same or not? And what is the difference between a flexible and a hard e-Ink screen panel?
Thanks
Felix
Hello Wold101,
Thanks for your answer.
I need to continue to use the M5Stack Core as I have made some backplane electronics and need to use the M5Stack stock.
I didn't know about this post and I already used a diode and had a bug with the ESP. Probably this problem of low battery charge.
The idea is great to use a MAX40200 but it requires extra wiring.
I tried with a capacitor. I have some 4700µf in stock at 63V.
I like this solution, no modification and it works well.
I will test it over several days.
I use this code in stickc as esp receiver for debug. And on other atom lite i use only broadcast datablock with convert to str block with my message. And its works.
As I promised here at end of my post under another thread, the shutdown() is rather buggy in the way awakening is performed.
I'll describe here what I experienced.
Anyway one should take this advice of @felmue in account.
There are different shutdown() overload variations and here bugs or weird things I found.
My goal was holding the M5Paper as much as possible sleeping, but at intervals of every full 5 minutes he should awake for about 10 to 15 seconds, perform some tasks (sensors) and go again sleeping to the next full 5-minute moment.
overload-2 int shutdown( int seconds );
Even if I calc enough seconds to next 5-minute moment, it seems impossible to stay asleep for remaining 5 minutes. Every 3th minute it is awakening too. This consumes unnecessary double battery power.
So where I want to have this wake up schedule: hh:00 hh:05 hh:10 hh:15 hh:20 ...and so on...
I get this wake up schedule: hh:00 hh:03 hh:05 hh:08 hh:10 hh:13 hh:15 hh:18 hh:20 ...and so on...
This overload-2 has no problems by passing the midnight moment.
overload-3
int shutdown( const rtc_time_t &RTC_TimeStruct );
This variation works best. Passing midnight (so date change) is no problem but 24:00u should be given als 00:00u.
overload-4
int shutdown( const rtc_date_t &RTC_DateStruct, const rtc_time_t &RTC_TimeStruct );
is working, but passing midnight in a way to set awake time at 00:00h and increasing the date-parameter does NOT work! Also 24:00u without increasing the date does NOT work.
The only way to pass midnight is awaking just some seconds before midnight and stay awake till after midnight, do the things that has to be done (sample sensors) and go asleep for remaining period (in my case to 00:05u).
I hope others can take advantage of this info.
@felmue
Hello Felix,
No, didn't try rename rtc. What difference should it make? (In C++ rtc and RTC are different identifiers, is n't it).
The reason for introduction of the own internal rtc of the ESP32 was looking for a simple way to set the system clock from the M5Paper RTC after awakening and without connecting to WiFi (this is very time- and battery-consuming).
The weird thing is: syncing with NTP is rather simple in ESP32-Arduino environment, but just setting the system time equal to the 'external' BM8563 RTC-time is more complicated. There is no simple routine. I found some not so elegant way with mktime().
Another point: I discovered bugs with awakening the M5Paper when this awakening moment should be exactly at midnight: so at 24:00u or 00:00u.
See a next post (if I find time to describe).
@m5stack thnx, I solved this problem - indeed I had to load board definitions
Also this YT-video 'M5Paper Seasons Greetings Display' was helpful: https://youtu.be/Tjz4fGRn8fo
Use :
void GT911::updateB() // as update but modify by Bricox ...
{
r814E.reads = read(0x814E); // "read struct" AND these 5 explicite bits fields
if(r814E.status)
{
if(r814E.touchPts != 0)
{
_is_finger_up = false;
_num = r814E.touchPts; // "_num" could be definitively replaced by "r814E.touchPts"
uint8_t data[num * 8];
read(0x8150, data, _num * 8); // read block of all fingers , up to 5*8 bytes
for(int j = 0; j < _num; j++) // for each finger
{
uint8_t *buf = data + j * 8;// address base of each finger
Sorry, comments that were aligned, in my notepad++ by multiple Tabs, are no longer aligned in the snippets viewer
When you install UIFlow and finish setting up the wifi, the API key will be displayed on the screen along with the mode and the network you have connected the device to.
As mentioned in the other thread, the missing step is transferring the canvas framebuffer to the EPD.
If your loop function is changed as below, it works as you expect.
void loop() {
for (int i=1; i<7; i++)
{
canvas1.drawString(testString[i],20,20);
/* m5epd_err_t UpdateArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h, m5epd_update_mode_t mode); */
M5.EPD.WriteFullGram4bpp((uint8_t*)canvas1.frameBuffer());
M5.EPD.UpdateArea(0,0,100,100,UPDATE_MODE_GL16);
delay(1000);
}
}