Hi, I have a Core Basic HVAC program communicating with two Stamps using ESP_NOW and they are physically close, but the idea was to not run messy cables! The ESP_NOW is peer to peer WiFi, but no login to the internet or even the WiFi router.
One Stamp reads the HVAC vent temperature and reports to the Core, which in turn calculates the damper vane angle and transmits that back to the very same Stamp connected to a 180 servo motor.
The other Stamp just operates one or two small under desk heaters as required, by the Core.
Hope this helps.
Terry

Best posts made by teastain
-
RE: High Level Question regarding M5Stamp and Core2
-
RE: How to change the I2C address of EXT.IO2
@felmue "For testing integrity" I'm using the github EXT.IO Zip download and running the DIGITAL_INPUT_OUTPUT example right from there and then later from my Arduino directory, after checking that both Libraries M5Stack And EXT_IO are up to date.
Note, stubbornly I am using Arduino 1.8.19.
The Example would not run until I added Wire.begin(21, 22); delay(1000);
Seriously. I take it out and the sketch throws errors.
I am also disappointed that setPinMode "came and went".
I am becoming discouraged with M5Stack, unfortunately. -
RE: Looking for kind souls to adopt this aged brain and eyes.
@ajb2k3 I really like the idea of REPL !
MY(!) aging brain is resisting learning a new programming language.
In the (late) 70's I programmed in machine code and felt C was a "high level language".
I will investigate Python, could be fun!
Cheers to all.
-
RE: Connecting M5stack to PCB with header and GPIO capacity.
@mtylerjr The Core Basic has 15 GPIO peripherally arranged in the battery base, as well as generous grounds and voltage options.
-
Stamp ext IO2 (SKU:S002) able to use individual pins, not just one mode for the whole board!
Currently it seems that the Stamp ext IO2 can only be in one mode for all pins, set by the command: (for example)
extio_io_mode_t mode = DIGITAL_OUTPUT_MODE;
or
extio.setAllPinMode(RGB_LED_MODE);
Also like the RGB mode to support a string, not just one SK6812.
Thanks for listening.
Terry -
RE: High Level Question regarding M5Stamp and Core2
Hi Thomas. The desk is wooden.
But you can expect typical range and "through walls" of a WiFi router in your house.
WiFi uses quite a bit more current than you might think.
I run mine on 5V iPhone white cube USB power supplies. -
RE: Stamp ext IO2 (SKU:S002) able to use individual pins, not just one mode for the whole board!
@felmue Hi Felix, me again.
Regarding the PaHub:
I found the Official M5Stack PaHub example to be of little help to write a useful project with 2 sensors with the same I2C address. I made this example very minimalist using a M5Stack Core Basic controller.
PaHub Example with 2 ENVII temperature sensors:
I put it on GitHub https://github.com/teastainGit/Simple-PaHub-example
Would you have time to look it over and "Maybe" submit it to M5Stack? To be added to their example for PaHub?
If not could you tell me how to submit it? I am asking you because you have a great reputation with them!!!
Cheers! Terry -
RE: ReInstall Original Screen on new Core2
Hi! When I got my Core2 there was an amazing Factory Test Demo program that showed all of the capabilities of the new "Core2".
After much digging I found the source code again here:
https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Core/M5Core2/Arduino
The source code is C++ and will compile in Arduino IDE.
But...it is not written in hobbyist style Arduino code with
void setup()
void loop()Therefore I found it very difficult to "follow" (inscrutable) and found it of little use to me for further Arduino programs.
Brilliant and fun to watch Demo, though!
Hope this helps: Terry -
RE: ENV III unit on M5Stack CoreInk
@ajb2k3 The std ENV Library works with Stamp-PICO, but not Stamp-C3.
The GET works with PICO, not C3.
Bringing the library code into the Arduino void loop() works for both products.
I re-wrote the standard library to remove the GET and instead used this:
#include <SHT3Xnew.h>
unsigned int data[2];
float sensor() {
Wire.beginTransmission(0x44);
Wire.write(0x2C);
Wire.write(0x06);
if (Wire.endTransmission() != 0) {
Serial.println("not = 0 ");
}
delay(50);
Wire.requestFrom(0x44, 2);
data[0] = Wire.read();
data[1] = Wire.read();
delay(50);
return ((((data[0] * 256.0) + data[1]) * 175) / 65535.0) - 45;
}This Library works with both, but is just a test, only reads cTemp, ;)
-
ESP NOW worked for 1 year but suddenly stopped after Board/Library update!!!
Hi, all! I use a M5Stack Core Basic to communicate with two M5Stamp boards, in an HVAC app in my home office. (Using the latest Arduino ver 1.8.19) They all worked perfectly together as a stable solution...however...I had updated all my libraries as available. I wanted to edit a screen text and when I uploaded, the source compiled no problems, but the serial error message was "Failed to add peer" and "Error sending the data". (text messages in my code that I put there last year.
I had used the official M5Stack board def, so I tried the older ES32 Arduino folder, M5Stack-Core-RSP32, which USED to do the trick. Still no comm and I tried to revert the Board definitions and no joy.
My basic ESP NOW template is here: https://github.com/teastainGit/ESP_NOWpeer2peer/blob/main/ESPpeer2peer.ino
I put this code into two StickCPlus, with corrected MAC and it used to work. Push the big button on one and the LED on the other comes on, and the same the other way.
I am stuck and need help! Thanks, Terry -
RE: ESP NOW worked for 1 year but suddenly stopped after Board/Library update!!!
@teastain SOLVED!
On one hand it did work for several years with ""esp_now_peer_info_t peerInfo;" placed in the void setup() !!!
After the Board definition, somewhow changed, the project just stopped communicating.
Researching every line of my program revealed that it should have been before the setup() as a declaration.
Whew, my desktop application is back on line! -
RE: need your advice for data transfer from a CORE2 to an ATOM display !
@arno The built-in SPI would provide the fastest frame rate but trickier to access the SPI on the Core2, second choice is the built-in I2C interface accessible by the standard Grove port on the left side.
The Core2 is bereft of GPIO as a nod to WiFi BLE I2C ESP_NOW, etc, whereas the foundational Core Basic is better equipped with I/O options!!!
I think M5Stack announced recently a GPIO base to convert the Core2.
I have a Core2 running a simulated nixie-tube clock and two Core Basics.
https://shop.m5stack.com/collections/m5stack-new-arrival/products/extension-port-module-for-core2?variant=43165402398977Extension Port Module for Core2
SKU: M123 Regular price$6.95 Out Of Stock -
RE: What is the best way to connect an PWA with multiple M5 Controllers
@mchott ESP_NOW in peer to peer mode.
I wrote this simple bare-bones application to share with other makers.
https://github.com/teastainGit/ESP_NOWpeer2peer
I have a Core Basic communicating with two M5Stamps in the same room, controlling space heaters and an HVAC vent damper position. etc.
The github example is used in all three devices -
RE: Micropython on the core2
Hi Mike:
The Arduino IDE is a program environment using a very easy and convenient version of C, with some C++!
Very user friendly, but easy to get started. C compiles and overwrites everything in the ESP32.
Python is very easy to learn, but it is an Interpreted Language with a large memory usage in the board's core.
C is a world wide standard because it gets as close to the metal as you can stand.
I've been using Arduino IDE ver1 for ten years The new version 2 is more powerful, but more confusing. -
RE: How to change the I2C address of EXT.IO2
@gorilla As I have a Core Basic and several EXT.IO2s I tried the Sample from M5Stack called DIGITAL_INPUT_OUTPUT downloaded directly, this minute and all I get is "extio Connect Error", same as you, you are not alone!
I ran my homebrew EXT.IO2 no library version with the C code in-line and it works fine, connected and flashing.
Attn @felmue I dug up my program from July, from AFTER you added "extio.setPinMode", which worked fine, then, but NOW the same program won't compile and throws error "class M5_EXTIO2' has no member named 'setPinMode'; did you mean 'setAllPinMode'?"
Please help! -
RE: Core modules have rectangles/triangles in the UI designer, Core2 does not
Adam, I did not know Core2 uses LVGL!
You are a Wizard!
-Terry -
RE: [SOLVED] M5GO BOTTOM2 (For CORE2 only) - LEDBar not working on Core2
@cpersoz The nomenclature of the Demo program is a little vague, but I checked both schematics of the Core2 and the Bottom2 and 25 is the RGB and 34 is the I2S!
#define PIN_CLK 0 // I2S
#define PIN_DATA 34#define NUM_LEDS 10 //LED
#define DATA_PIN 25 -
RE: Is the Grove port on the M5Stack Basic Core digital or analog?
https://github.com/Seeed-Studio/Accelerometer_ADXL345
This is all you need to get a demo running.
-You will also have to install these libraries:
#include <Wire.h>
#include <ADXL345.h> -
RE: atom motion control servos independently or simultaneously, access each channel
Yes, you would send position or speed values to each channel.
There should be an example in the documents.
If I misunderstand let me know and I will research further.
Arduino IDE, no problem, and I’m sure it is facilitated in UIFlow.
-
RE: Max amount of devices able to connect to M5Core2
@hopscotch123 There is an easy way around I2C address conflicts, M5Stack PaHub 1 to 6 I2C multiplexer:
https://docs.m5stack.com/en/unit/pahub2I made a test program/example using two ENVII sensors, as examples:
https://github.com/teastainGit/Simple-PaHub-exampleI only program in C, C++ (like Arduino), because you can do ANYTHING you want and not limited to what is currently available in Python/UIFlow. Hope that is OK !