XYZprint をアンインストールした後に、下記の3フォルダを削除して、XYZprintを再インストールする。
%USERPROFILE%\AppData\Roaming\XYZprint
%USERPROFILE%\Documents\XYZprintInfo
%ALLUSERSPROFILE%\XYZprintingInc\XYZprint
| // M5Atom で BME688 のガスセンサ・ヒーターを操作するサンプル | |
| // 2022/1/6 @ksasao | |
| // | |
| // 利用デバイス: | |
| // デバイスは、下記などで入手してください | |
| // BME688搭載 4種空気質センサモジュール(ガス/温度/気圧/湿度) | |
| // https://www.switch-science.com/catalog/7383/ | |
| // | |
| // ライブラリの追加: | |
| // https://github.com/BoschSensortec/Bosch-BME68x-Library |
| import numpy as np | |
| import random | |
| import math | |
| import cv2 | |
| from PIL import Image | |
| import sys | |
| def detect_markers(im): | |
| markers = [] | |
| height, width = im.shape[:2] |
| // RTC時刻(秒)とシステム時刻(ミリ秒)を読み込み | |
| long rtcSec = GetRtcSec(); | |
| long systemMillsec = GetSystemMillisec(); | |
| // delta ができるだけ 0~999 に収まるようにする | |
| long delta = (systemMillsec + offset) - rtcSec * 1000; | |
| // 100ms 以上のずれがある場合は offset を再計算 | |
| int d = 100; | |
| if(delta > 1000 + d || delta < -d) |
| using MetadataExtractor; | |
| using MetadataExtractor.Formats.Exif; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Numerics; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; |
| /// <summary> | |
| /// 非凸多角形に対して、a番目, b番目(a<b)の頂点を結んだときに他の辺と交差するかどうかを判定する | |
| /// </summary> | |
| /// <param name="pts">多角形の点列。点の並びが反時計回りになっていることを期待している。</param> | |
| /// <param name="a">a番目の点</param> | |
| /// <param name="b">b番目の点</param> | |
| /// <returns>交差すれば true</returns> | |
| private bool Crossed(PointF[] pts, int a, int b) | |
| { | |
| float abX = pts[b].X - pts[a].X; |
| // Sensirion SCD40を M5Atom で動かすためのサンプルコード | |
| // 2021/7/20 @ksasao | |
| // * 公式のサンプルコードを一部改変 | |
| // Arduino の [ツール]>[ライブラリを管理]で、SDC40で検索し、 | |
| // Sensirion I2C SCD4x を追加してビルドしてください | |
| // https://twitter.com/ksasao/status/1417455450929262598 | |
| /* | |
| * Copyright (c) 2021, Sensirion AG | |
| * All rights reserved. | |
| * |
| #include <M5StickC.h> | |
| float accX = 0; | |
| float accY = 0; | |
| float accZ = 0; | |
| void setup() { | |
| M5.begin(); | |
| M5.IMU.Init(); | |
| M5.Lcd.setRotation(3); |
XYZprint をアンインストールした後に、下記の3フォルダを削除して、XYZprintを再インストールする。
%USERPROFILE%\AppData\Roaming\XYZprint
%USERPROFILE%\Documents\XYZprintInfo
%ALLUSERSPROFILE%\XYZprintingInc\XYZprint
| #include <M5EPD.h> | |
| #define ADDR 0x50 | |
| void writeByte(uint8_t address, uint8_t data){ | |
| Wire.beginTransmission(ADDR); | |
| Wire.write(address); | |
| Wire.write(data); | |
| Wire.endTransmission(); | |
| delay(5); |
| // CeVIO の DLL を動的に呼び出すサンプル | |
| // CeVIO 試用版は下記 | |
| // https://sites.google.com/site/ceviouserguides/archive/ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Text; |