This file contains 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 |
This file contains 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 machine import I2C | |
i2c=I2C(1) | |
i2c.init(freq=1000000) | |
oled = SSD1306_I2C(128, 64, i2c) | |
console = FBConsole(oled) | |
os.dupterm(console) |
This file contains 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
/* | |
* File: smplefm.cpp | |
* | |
* Simple FM Synthesis | |
* | |
*/ | |
#include "userosc.h" | |
typedef struct State { |
This file contains 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 "userosc.h" | |
typedef struct State { | |
float w0; | |
float phase; | |
uint8_t flags; | |
} State; | |
enum { | |
k_flags_none = 0, |
This file contains 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 "audio_provider.h" | |
#include "micro_features/micro_model_settings.h" | |
#include <Arduino.h> | |
#include <M5Stack.h> | |
#include <driver/i2s.h> | |
#define ADC_INPUT ADC1_CHANNEL_6 //pin 34, for M5Stack Fire | |
#define PIN_MICROPHONE 34 | |
#define ADC_OFFSET (ADC_INPUT * 0x1000 + 0xFFF) | |
#define BACKLIGHT 32 |
This file contains 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 "command_responder.h" | |
#include <M5Stack.h> | |
#include <Avatar.h> | |
using namespace m5avatar; | |
Avatar avatar; | |
void InitResponder() { | |
M5.begin(); | |
M5.Lcd.fillScreen(BLACK); |
This file contains 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 | |
monitor_speed = 115200 | |
build_flags = -DARDUINOSTL_M_H -Ilib/tfmicro/third_party/gemmlowp -Ilib/tfmicro/third_party/flatbuffers/include -Ilib/tfmicro/third_party/kissfft |
This file contains 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 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
extern TfLiteStatus SetupAccelerometer(tflite::ErrorReporter* error_reporter); | |
extern bool ReadAccelerometer(tflite::ErrorReporter* error_reporter, | |
float* input, int length, bool reset_buffer); |
This file contains 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 "output_handler.h" | |
#include <Arduino.h> | |
#include <M5Stack.h> | |
void DrawWing() { | |
int x = 60; | |
int y = 20; | |
int w = 200; | |
int h = 200; | |
int t = 20; |
NewerOlder