I did a lot of searching trying to understand the ESP32-ULP. Here are some links I'd like to save for later.
Hoping this will be of some help...
I struggled over much online help to find code that worked for deepsleep and external wake interrupt.
I did a lot of searching trying to understand the ESP32-ULP. Here are some links I'd like to save for later.
Hoping this will be of some help...
I struggled over much online help to find code that worked for deepsleep and external wake interrupt.
| #include <Arduino.h> | |
| #include <M5StickC.h> | |
| #include <utility/MPU6886.h> // used for accessing MPU constants | |
| void mpu6886_wake_on_motion_isr(void); // declaration of ISR | |
| void mpu6886_wake_on_motion_setup(void); // declaration of setup | |
| // lifted from https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp | |
| // if integrated with M5StickC library, use internal class function instead | |
| void MPU6886_I2C_Read_NBytes(uint8_t start_Addr, uint8_t number_Bytes, uint8_t *read_Buffer){ |
| #include <Arduino.h> | |
| #include <M5StickC.h> | |
| #include <utility/MPU6886.h> // used for accessing MPU constants | |
| #include <driver/rtc_io.h> | |
| void mpu6886_wake_on_motion_isr(void); // declaration of ISR | |
| void mpu6886_wake_on_motion_setup(void); // declaration of setup | |
| // lifted from https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp | |
| // if integrated with M5StickC library, use internal class function instead |
The below steps assume that there's some polynomial type (could just be a length-N list) and support functions that are aware of that type.
order(p1) - returns the order of polynomial p1highest(p1) - highest order coefficient of p1add(p1, p2) - adds two polynomialssub(p1, p2) - subtracts two polynomials| <html> | |
| <head> | |
| <title>BLE IMU Receiver</title> | |
| </head> | |
| <body style="font-family:'Inconsolata', sans-serif;"> | |
| <div style="text-align: center;"> | |
| <h1>BLE IMU Receiver</h1> |
| # ble_tof | |
| import struct | |
| from machine import I2C, SoftI2C, Pin, Timer | |
| from vl53l0x import VL53L0X | |
| import m5stickc | |
| import m5stickc_lcd |
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| .note_button { | |
| background-color: #1f78b4; | |
| border: none; | |
| color: white; | |
| padding: 15px 32px; | |
| text-align: center; |
| python -m mpy_cross wifi_connect.py |