This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "accelerometer_handler.h" | |
#include "constants.h" | |
#include <Arduino.h> | |
#include <M5Stack.h> | |
#include "utility/MPU9250.h" | |
MPU9250 IMU; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[env:m5stack-fire] | |
platform = espressif32 | |
board = m5stack-fire | |
framework = arduino | |
build_flags = -Ilib/tfmicro/third_party/gemmlowp -Ilib/tfmicro/third_party/flatbuffers/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<Arduino.h> | |
#include<math.h> | |
#include "tensorflow/lite/experimental/micro/kernels/all_ops_resolver.h" | |
#include "tensorflow/lite/experimental/micro/micro_error_reporter.h" | |
#include "tensorflow/lite/experimental/micro/micro_interpreter.h" | |
#include "sine_model_data.h" | |
#include <M5Stack.h> | |
#define BLACK 0x0000 | |
#define WHITE 0xFFFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[env:m5stack-fire] | |
platform = espressif32 | |
board = m5stack-fire | |
framework = arduino | |
board_build.partitions = custom.csv | |
lib_deps = tfmicro | |
build_flags = -Ilib/tfmicro/third_party/gemmlowp -Ilib/tfmicro/third_party/flatbuffers/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sensor, lcd, image | |
sensor.reset() | |
sensor.set_framesize(sensor.QVGA) | |
sensor.set_pixformat(sensor.RGB565) | |
sensor.set_hmirror(False) | |
lcd.init(freq=15000000) | |
face_cascade = image.HaarCascade("frontalface", stages=25) | |
while (True): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sensor, lcd, image | |
import time | |
sensor.reset() | |
sensor.set_pixformat(sensor.RGB565) | |
sensor.set_framesize(sensor.QVGA) | |
sensor.set_hmirror(0) | |
sensor.run(1) | |
sensor.skip_frames() | |
lcd.init(freq=15000000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Maix import GPIO | |
fm.register(32, fm.fpioa.GPIO1) | |
sp_en=GPIO(GPIO.GPIO1,GPIO.OUT) | |
sp_en.value(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WIFI_SSID = "ssid" | |
WIFI_PASSWD = "password" | |
import network, time | |
print("=== Configuring FPIOA") | |
from fpioa_manager import fm, board_info | |
from Maix import GPIO | |
from machine import UART |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import video,time | |
from Maix import GPIO | |
fm.register(34, fm.fpioa.I2S0_OUT_D1) | |
fm.register(35, fm.fpioa.I2S0_SCLK) | |
fm.register(33, fm.fpioa.I2S0_WS) | |
fm.register(8, fm.fpioa.GPIO0) | |
wifi_en=GPIO(GPIO.GPIO0,GPIO.OUT) | |
wifi_en.value(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fpioa_manager import * | |
from Maix import I2S, GPIO | |
import audio | |
# disable wifi | |
fm.register(8, fm.fpioa.GPIO0) | |
wifi_en=GPIO(GPIO.GPIO0,GPIO.OUT) | |
wifi_en.value(0) | |
# register i2s(i2s0) pin |