Git Product home page Git Product logo

stamp-c3's Introduction

M5Stack Library

Arduino Lint Clang Format

English | 中文 | 日本語

The M5Stack library provides access to the built-in hardware of the M5Stack Core (including Basic and Gray) controllers.

Recommendation

This library is not recommended for new projects, nor for projects using M5Stack products other than Basic and Gray. See M5Unified and M5GFX for libraries that are more up-to-date and with support for many newer M5Stack products.

Usage

This library's functionality is available through the M5Stack class, referenced as M5, including:

  • LCD display via M5.Lcd, a customized version of the TFT_eSPI LCD library, adapted for Basic and Gray. The display resolution is 320x240 supporting 262K colors. Several fonts, graphics primitives, QR code rendering, and PNG/BMP/JPEG support are included.
  • Power control, including device shutoff and battery level detection via M5.Power and the IP5306 power management chip
  • Hardware buttons via M5.BtnA, M5.BtnB, M5.BtnC
  • Speaker, via M5.Speaker, supporting tones, volume control, and basic wave audio playback using ESP32's DAC function
  • Accelerometer, via M5.Imu, M5.Mpu6886, or M5.Sh200Q (accelerometer type depends on version of Basic/Gray)

To use the M5Stack library, #include "M5Stack.h" must appear at the top of your sketch.

The most productive way to become acquainted with the class is through the numerous included examples. Additional documentation within this library:

Additional optional include files:

  • M5Faces.h for access to M5Stack Faces accessories (EOL)
  • LoRaWan.h

basicgray

Comparison of M5Stack controllers

M-BUS

More Information

UIFlow Quick Start: Click Here

MicroPython API: Click Here

Arduino IDE Development: Click Here

Gray PinMap: Click Here

Basic PinMap: v1.0 (EOL) v2.6 (EOL) v2.7**

USER CASES

stamp-c3's People

Contributors

eggfly avatar gitshaoxiang avatar tinyu-zhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stamp-c3's Issues

M1 Mac with Monterey, issue with driver for CH9102

When trying to use these boards with Mac OS Monterey on Macbook M1 Max,
the usb serial adapter is seen but uploading to the board (or doing any operations requiring writing to the device)
will fail with message "A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)"

I have filed a detailed issue here m5stack/M5EPD#47
The problem is the same

LED less brilliance - better for the eyes

Hi, I don't know how your experience is with this example but for me the very high brilliance of the r, g and b values for the LED (for my eyes) are way too high. I almost cannot look into the light without getting blinded for a while.
To solve this I added some definitions for the value of brilliance set initially:
I added the following definitions (from line 41):

/* Added by @PaulskPt */
uint8_t brill_red = 0;     // Initial brilliance
uint8_t brill_green = 25;  // idem
uint8_t brill_blue = 25;   // idem
#define  brill  30       // inside main loop: max value for brilliance

Then I changed : update_led(0, 255, 200);
into:

    ESP_LOGI("Main", "Initial LED brilliance set to: r(%d), g(%d) and b(%d)", brill_red, brill_green, brill_blue); 
    update_led(brill_red, brill_green, brill_blue); 

and inside the loop of app_main():
instead of:

                int r = rand() % 256"
                int g = rand() % 256;
                int b = rand() % 256;

I changed into:

                int r = rand() % brill; 
                int g = rand() % brill;
                int b = rand() % brill;

Finally, below the line printing the MAC address, I added the following print line:

                ESP_LOGI("Main", "LED brilliance for r(%d), g(%d) and b(%d) maximum: %d", r, g, b, brill);

See the mods in my fork:

https://github.com/PaulskPt/STAMP-C3/blob/master/idf/RGB_LED_Control/main/main.c

COM Port Output freezing

The RGB_LED_Control program has an issue where the serial port output stops. This is caused by setting pin 21 configuration wrong. It can be fixed by commenting it out on the list of pins that are being configured in the for loop that follows (in main.c):

#ifdef STAMP_C3
uint8_t PINS[] = {4, 5, 6, 7, 8, 10, 1, 0, /* 21, */ 20, 9, 18, 19, };
#define BTN_PIN 3
#endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.