Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mhama
mhama / LGFX_RP2040_128_Waveshare.hpp
Created January 28, 2023 12:31
LovyanGFX definition for Waveshare RP2040-LCD-1.28 (round LCD with RP2040 microcontroller)
#pragma once
#define LGFX_USE_V1
#include <LovyanGFX.hpp>
// LGFX for Waveshare RP2040-LCD-1.28
// https://www.waveshare.com/wiki/RP2040-LCD-1.28
// ref: https://github.com/lovyan03/LovyanGFX/blob/master/src/lgfx_user/LGFX_RP2040_096_Waveshare_sample.hpp
@mhama
mhama / M5StackToioTargetMover.ino
Last active January 2, 2021 18:27
move toio precisely with M5Stack. ToioMover class and example (Please use this branch https://github.com/mhama/M5StackToio/tree/feature/id_reader_sensor of M5StackToio)
#include <M5Stack.h>
#include <Toio.h>
#include "ToioMover.h"
// Toio オブジェクト生成
Toio toio;
ToioMover *mover;
void setup() {
// M5Stack の初期化
@mhama
mhama / M5StickCWifiConfig.ino
Last active September 21, 2020 07:17
Wifi Configurator for M5StickC using WiFiManager (development branch) see: https://qiita.com/mhama/items/ff5ae397a853aa4f8d48
#include <M5StickC.h>
#include <WiFiManager.h>
WiFiManager wifiManager;
bool isWifiConfigSucceeded = false;
void showMessage(String msg)
{
M5.Lcd.setRotation(1);
M5.Lcd.setCursor(0, 10, 2);
@mhama
mhama / lec.go
Created February 13, 2019 07:17
line ending checker
package main
import (
"bufio"
"fmt"
"io"
"os"
"strings"
)
function FindProxyForURL(url, host) {
return "SOCKS 192.168.10.3:8889";
}