@HappyUser it is not impossible to port the source code from PlatformIO to Arduino or vice versa.
Here is someone who made a script for it.
Maybe the script does not work right out of the box but it could give you some hints or insight about what is needed to port the source code.
As I understand it the two platforms are very similar but their build/make process and their library management are a bit different.
Posts made by Cognitive5525
-
RE: Unit cam S3 : .ino files , where to find
-
RE: AIN4-20mA Unit to Arduino Nano Every
I think the MODULE_4_20MA (in the src folder) is only using some standard libraries:
From top src/MODULE_4_20MA.h:#ifndef __MODULE_4_20MA_H #define __MODULE_4_20MA_H #include "Arduino.h" #include "Wire.h"
Try to download only the two files in the src-folder and see if you can include them into your project and compile.
Also: If you look at the code in src/MODULE_4_20MA.cpp you'll see that they include some register addresses, maybe that is required for this AIN4-20mA unit?
-
RE: AIN4-20mA Unit to Arduino Nano Every
@spectrad said in AIN4-20mA Unit to Arduino Nano Every:
@spectrad have you tried with the M5Stack example here?
No as I am not using an M5Stack, I am trying to use an Arduino Nano Every.
Ah sorry I overlooked that, but even though you're not using a M5stack MC I still believe that you might be able to get some "inspiration" from it. Have a look at the module MODULE_4_20MA in src-folder. As far as I can see it does not rely on any special M5stack libraries at this level.
-
RE: M5Stack PoE-CAM-HTTP-STREAM issues
I have burned my camera with the latest firmware (1.1.0) and the the long press on the side to get access to the config does not work by me either. But if I burn it with version 1.0.0 the long press works:
However, if you can see an IP on the serial interface you have probably connected the camera to a network with a DHCP and you should be able to stream if your PC is connected to the same network.
But note that the urls are:
http://<CAM_IP>/stream for v 1.0.0.
and
http://<CAM_IP>/ for v 1.1.0. -
RE: EXT unit to measure engine RPM
@nzmikec said in EXT unit to measure engine RPM:
..... i2c device to count these pulses and send my device an RPM value.
What is the device you're going to use to receive the values on I2C?
Maximum RPM (and pulses per minute) would be 11,000RPM.
Maybe you don't need an external device for counting. 11,000 RPM with 1 pulse pr revolution is about 190 Hz which an ESP32 should be able to count directly by it self via one of its GPIO's.
-
RE: RTC vs ESP32 timer
The RTC (BM8563) is a separate chip on the M5Dial board (it is also used on some other M5Stack products).
It is literally hardwired to the battery which means you can keep track of the clock even while the M5Dial board is shut down - that is as long as you always keep an un-depleted battery connected to the board. The BM8563 chip consumes less than 3 µA@"stdLiIonVoltage" -
RE: M5Dial, no wake up with button
@felmue said in M5Dial, no wake up with button:
please find my measurements here.
What voltage did you use?
M5Dial.h includes M5Unified.h. See here.
Ah OK! I see you are using a "dedicated" library for M5Dial which in term relies on the "general" M5Unified library. I found a similar "dedicated" for the CoreINK but that seem not to use M5Unified.
So I stick with using M5Unified "directly".. -
RE: M5Dial, no wake up with button
@felmue said in M5Dial, no wake up with button:
please find my example here.
I can see you import M5Dial.h is this supposed to be a part of M5Unified?
I use M5Unified.h in my code for my Core INKs.. -
RE: M5Dial, no wake up with button
@felmue said in M5Dial, no wake up with button:
BTW: as an experiment to prove the above I removed the 5 V connection between M5Stamp and M5Dial board and now I can power M5Dial from the green connector and it does a proper shutdown (same as when powered from battery) and can be woken by the wake button.
Excellent! Now I'm curious : what is the current consumption on the external power input when the board is powered off or "sleeping"
-
RE: M5Dial, no wake up with button
@felmue said in M5Dial, no wake up with button:
everybody can call any of the sleep / shutdown modes as they like. I try to be consistent in writing deep or light sleep when I mean the sleep modes of the ESP32 and shutdown mode when I mean it is done via MOSFET.
Agree and I know you are. Unfortunately M5Stack are not very consistent! They call it "sleep" when the board is shut down. Their timerSleep() function is supposed to shut down their boards with BM8563 RTC.
I also agree the M5Dial should be able to "shutdownsleep" (new term 😜) when powered from the green power terminals (P5 ?).
However, where does this one lead?
-
RE: M5Dial, no wake up with button
@happyuser said in M5Dial, no wake up with button:
external power.
External power as-in via the green power terminals?
-
RE: M5Dial, no wake up with button
@felmue said in M5Dial, no wake up with button:
On the other hand when M5Dial is in shutdown mode the MOSFET is off (the only thing still running is the RTC IC). So then either the wake button or the RTC can power the M5Dial back on.
Agree!
This is completely similar to the CoreINK, but as I mentioned in this post: when the board is shut down but the BM8563 RTC is setup to wake it up then this is in "my book" also a kind of sleep mode. -
RE: M5Dial, no wake up with button
The M5stack way of "sleeping" is not possible if you power via the USB..
Unless there is a bug in M5Unified library for the M5Dial I'm pretty sure M5.begin will take care of keeping G46 high. -
RE: M5Dial, no wake up with button
@happyuser said in M5Dial, no wake up with button:
digitalWrite(GPIO_NUM_46,HIGH);
If you have M5.begin(); in your setup it shouldn't be necessary to pull pin 46 high, this should be done by the begin() function.
Also to wake with the "wake" button you might need to keep it pressed for a short while.
-
RE: M5Dial, no wake up with button
@happyuser said in M5Dial, no wake up with button:
Thank you, to be honest, no idea, but it is not an option.
I understand that it might not be possible to use the reset button in your final solution, but it is still interesting to know for the ongoing troubleshooting....
-
RE: M5Dial, no wake up with button
@happyuser This might also be related to your power consumption problem.
What happens if you press the reset button just before pressing the "start" button?
-
RE: M5Dial, high power consumption during deep sleep.
Cheers, I'll be interested in your findings!
As you might have seen in this small "saga" here, I have a similar problem with some (but not all) of my 30+ CoreINK devices which have a similar power control circuit.
-
RE: QR-Code Reader - Trigger read from serial port and read code value
From this Arduino example the answer is yes.
Note I think there is a typo in line 49.
Serial2.write(start_scan_cmd, sizeof(stop_scan_cmd));
should probably be
Serial2.write(stop_scan_cmd, sizeof(stop_scan_cmd));