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 cv2 | |
# pip install opencv-python | |
# でopenvcを入れて、imshowで画像を表示できるが、 | |
# 1. Windowのcloseボタンを押すとウィンドウは閉じるがハングする。 | |
# 2. destroyAllWindowsで閉じたあとハングする可能性がある | |
# ... という問題がある。 | |
# 解決策がいくつか提示されている。 | |
# http://louis-needless.hatenablog.com/entry/how_to_close_opencv_window_by_mouse | |
# https://stackoverflow.com/questions/6116564/destroywindow-does-not-close-window-on-mac-using-python-and-opencv |
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 lcd | |
import utime | |
import sys | |
from machine import I2C | |
from Maix import GPIO | |
from fpioa_manager import * | |
i2c = I2C(I2C.I2C0, freq=400000, scl=28, sda=29) | |
# And a short delay to wait until the I2C port has finished activating. | |
utime.sleep_ms(100) |
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 "M5StickCPlus.h" | |
#include <Wire.h> | |
// lcd | |
uint8_t brightnessLevel = 8; | |
uint8_t RotateSet = 1; // for right finger | |
// buttuns | |
#define BTN_A_PIN 37 | |
#define BTN_B_PIN 39 |
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 audio | |
import gc | |
import image | |
import lcd | |
import sensor | |
import sys | |
import time | |
import uos | |
import KPU as kpu | |
from fpioa_manager import * |
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
#servo : sg90 | |
from machine import Timer,PWM | |
import lcd | |
import image | |
import time | |
import sys | |
lcd.init() | |
img = image.Image() |
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
## M5StickV MPU6886 maixpy | |
## Referred to the following | |
## https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp | |
##https://github.com/m5stack/M5-Schematic/blob/master/datasheet/MPU-6886-000193%2Bv1.1_GHIC.PDF.pdf | |
from machine import I2C | |
MPU6886_ADDRESS=0x68 | |
MPU6886_WHOAMI=0x75 | |
MPU6886_ACCEL_INTEL_CTRL= 0x69 |
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
# MicroPython sample program for M5Stack with AMG8833 | |
""" | |
COPYRIGHT | |
This code is licensed under the MIT license. | |
<https://opensource.org/licenses/MIT> | |
Copyright (c) 2018 Switch Science, inc. |
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
using System.IO; | |
namespace ZapAll | |
{ | |
class Program | |
{ | |
private static readonly char separator = Path.DirectorySeparatorChar; | |
static void Main(string[] args) | |
{ |
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 "dwmswitch.h" | |
void ShowLastError(void){ | |
LPVOID lpMessageBuffer; | |
FormatMessage( | |
FORMAT_MESSAGE_ALLOCATE_BUFFER | | |
FORMAT_MESSAGE_FROM_SYSTEM, | |
NULL, | |
GetLastError(), |