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
# -*- coding: utf-8 -*- | |
# インクルード | |
import numpy as np | |
import scipy.io | |
# データ作成 | |
val1 = np.arange(10) | |
val2 = np.arange(15) | |
dict = {"python":val1, "matlab":val2} |
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
# -*- coding: utf-8 -*- | |
# インクルード | |
import numpy as np | |
import scipy.io | |
# データ作成 | |
arr = np.zeros((10,), dtype=[('pyhton','f8'),('matlab','f8')]) | |
# mat保存 |
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
# -*- coding: utf-8 -*- | |
# インクルード | |
import numpy as np | |
import scipy.io | |
# データ作成 | |
strarr = np.array(["python", "matlab"], dtype=object) | |
# mat保存 |
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
# -*- coding: utf-8 -*- | |
# インクルード | |
import numpy as np | |
import scipy.io | |
# データ作成 | |
strarr = ["python", "matlab"] | |
# mat保存 |
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
# -*- coding: utf-8 -*- | |
# インクルード | |
import numpy as np | |
import scipy.io | |
# データ作成 | |
data = np.arange(10) | |
# mat保存 |
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
# Convert PRN to EPS script by ps2epsi | |
from subprocess import Popen | |
import os | |
import sys | |
if __name__ == '__main__': | |
# Get full path | |
path = os.path.dirname(sys.argv[0]) |
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 glob | |
from subprocess import Popen | |
import os | |
os.mkdir('eps') | |
file = glob.glob('ps/*') | |
print(file) |
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
//Timer0 | |
TCCR0B = (TCCR0B & 0b11111000) | 0x01; //62.5 [kHz] | |
TCCR0B = (TCCR0B & 0b11111000) | 0x02; //7.8125 [kHz] | |
TCCR0B = (TCCR0B & 0b11111000) | 0x03; //976.5625 [Hz] | |
TCCR0B = (TCCR0B & 0b11111000) | 0x04; //244.140625 [Hz] | |
TCCR0B = (TCCR0B & 0b11111000) | 0x05; //61.03515625 [Hz] | |
//Timer1 | |
TCCR1B = (TCCR1B & 0b11111000) | 0x01; //31.37255 [kHz] | |
TCCR1B = (TCCR1B & 0b11111000) | 0x02; //3.92116 [kHz] |
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
/* | |
* PWM | |
*/ | |
#define PWM_INTERFACE PWM | |
#define PWM_INTERFACE_ID ID_PWM | |
#define PWM_FREQUENCY 1000 //ここ | |
#define PWM_MAX_DUTY_CYCLE 255 | |
#define PWM_MIN_DUTY_CYCLE 0 | |
#define PWM_RESOLUTION 8 |
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
//JY901のライブラリを使わないでキャリブレーションするプログラム | |
#include <Wire.h> | |
void setup() | |
{ | |
Wire.begin(); | |
Serial.begin(9600); | |
//Z軸調整モード |
NewerOlder