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
# | |
# By Richard Aplin, released into the public domain for any purpose, no warranties implied, 8/17/2022 | |
# | |
# | |
import struct | |
import serial | |
import time | |
#Super lightweight code to read Hopi HP-9800 power meter |
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
-DUSER_DEFINE=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
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html | |
sudo apt update | |
sudo apt upgrade | |
sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 | |
mkdir -p ~/esp | |
cd ~/esp | |
git clone --recursive https://github.com/espressif/esp-idf.git |
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
sudo apt install python3-venv unzip | |
curl -L https://go.microsoft.com/fwlink/?LinkID=760868 -o vscode.deb | |
sudo apt install ./vscode.deb | |
code --force --install-extension ms-ceintl.vscode-language-pack-ja | |
code --force --install-extension ms-vscode.cpptools | |
code --force --install-extension platformio.platformio-ide | |
cd ~ |
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
winget install Microsoft.VisualStudioCode --accept-package-agreements --accept-source-agreements --silent | |
call "C:\Users\%USERNAME%\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --force --install-extension ms-ceintl.vscode-language-pack-ja | |
call "C:\Users\%USERNAME%\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --force --install-extension ms-vscode.cpptools | |
call "C:\Users\%USERNAME%\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" --force --install-extension platformio.platformio-ide | |
cd C:\Users\%USERNAME%\Desktop | |
curl -L https://codeload.github.com/M5Fly-kanazawa/StampFly/zip/refs/heads/main -o StampFly.zip | |
tar -xf StampFly.zip | |
cd StampFly-main |
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
@ECHO OFF | |
IF EXIST "arduino-cli.exe" ( | |
ECHO arduino-cli find. | |
) ELSE ( | |
ECHO download arduino-cli | |
curl -L https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip -o arduino-cli_latest_Windows_64bit.zip | |
tar -xf arduino-cli_latest_Windows_64bit.zip | |
DEL arduino-cli_latest_Windows_64bit.zip | |
DEL LICENSE.txt |
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
const size_t usart1_buff_size = 256; | |
char usart1_buff[usart1_buff_size]; | |
uint16_t usart1_buff_write = 0; | |
uint16_t usart1_buff_read = 0; | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
void USART1_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); | |
void USART1_IRQHandler(void) { |
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 <WiFi.h> | |
#include <HTTPClient.h> | |
#include <WiFiClientSecure.h> | |
#include "x509_crt_bundle.h" | |
void setup() { | |
Serial.begin(115200); | |
WiFi.begin(); | |
Serial.print("Waiting for WiFi to connect..."); |
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
{ | |
"buildProperties": { | |
"version": "2.0.14", | |
"tools.xtensa-esp32-elf-gcc.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0", | |
"tools.xtensa-esp32s2-elf-gcc.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32s2-elf-gcc\\esp-2021r2-patch5-8.4.0", | |
"tools.xtensa-esp32s3-elf-gcc.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0", | |
"tools.xtensa-esp-elf-gdb.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp-elf-gdb\\11.2_20220823", | |
"tools.riscv32-esp-elf-gcc.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\riscv32-esp-elf-gcc\\esp-2021r2-patch5-8.4.0", | |
"tools.riscv32-esp-elf-gdb.path": "C:\\Users\\tanaka\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\riscv32-esp-elf-gdb\\11.2_20220823", | |
"debug.server.openocd.path": "C:\\Users\\tanaka\\AppData\\L |
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
#if !defined(ARDUINO) | |
#include <M5Unified.h> | |
enum pin_mode_t | |
{ | |
output, | |
input, | |
input_pullup, | |
input_pulldown |
NewerOlder