Skip to content

Instantly share code, notes, and snippets.

Avatar
👾

Kajiru sdkfz181tiger

👾
View GitHub Profile
@sdkfz181tiger
sdkfz181tiger / SerialPort.cpp
Last active Nov 28, 2022
SerialPort x Chrome x M5Atom
View SerialPort.cpp
#include "M5Atom.h"
using namespace std;
unsigned long counter = 0;
// Send to browser
void sendMsg(const string msg){
Serial.println(msg.c_str());
}
View custom_main.js
import { myName, myFunc, MyModule } from "./custom_module.js";
$(document).ready(()=>{
console.log("Ready!!");
// Variable
console.log(myName);
// Function
myFunc();
@sdkfz181tiger
sdkfz181tiger / BleServer.cpp
Last active Oct 24, 2022
BluetoothDevice x ChromeBrowser x M5Atom
View BleServer.cpp
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <BLE2902.h>
#include "M5Atom.h"
#define SERVICE_UUID "xxxxx"
#define CHARACTERISTIC_UUID "yyyyy"
#define DEVICE_NAME "BLE_Controller"
@sdkfz181tiger
sdkfz181tiger / BleServer.cpp
Last active Oct 24, 2022
BluetoothDevice x ChromeBrowser
View BleServer.cpp
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <BLE2902.h>
#define SERVICE_UUID "xxxxx"
#define CHARACTERISTIC_UUID "yyyyy"
#define DEVICE_NAME "BLE_Controller"
using namespace std;
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 21, 2022
PyAV基礎_03_2つの動画から画像を合成(Pillow)
View main.py
# coding: utf-8
"""
2つの動画から画像を合成 using Pillow
"""
import cv2, av, time
import numpy as np
from PIL import Image
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 21, 2022
PyAV基礎_02_2つの動画から画像を合成(OpenCV)
View main.py
# coding: utf-8
"""
2つの動画から画像を合成 using OpenCV
"""
import cv2, av, time
import numpy as np
from PIL import Image
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 20, 2022
PyAV基礎_01_2つの動画から画像を合成
View main.py
# coding: utf-8
"""
2つの動画から画像を合成 using Pillow
"""
import cv2, av
import numpy as np
from PIL import Image
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 17, 2022
Pillow基礎_07_画像の合成
View main.py
# coding: utf-8
"""
画像の合成
"""
import numpy as np
from PIL import Image, ImageChops
# 例1
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 17, 2022
Pillow基礎_06_画像のマスク
View main.py
# coding: utf-8
"""
画像のマスク
"""
import numpy as np
from PIL import Image
# 例1
@sdkfz181tiger
sdkfz181tiger / main.py
Last active Oct 17, 2022
Pillow基礎_05_画像の生成
View main.py
# coding: utf-8
"""
画像の生成
"""
import numpy as np
from PIL import Image
W = 256