2016-11-10から1日間の記事一覧

Arduino M0 Proでステッピングモータとエンコーダを使う

使ったのはPKPシリーズにとりつける、R2EL digitalWrite()の遅延があるので、どの程度サンプリング周波数を高められるかわからないが、とりあえず2.5usでタイマー割り込みをかけてみた。 #define INA1_PIN 2 #define INA2_PIN 3 #define INB1_PIN 4 #define …

Arduino M0 ProとArduino Due用のマルチタスクライブラリ

Due用 Schedulerライブラリ https://www.arduino.cc/en/Reference/SchedulerArduino M0 Pro用 https://db.tt/LoRELrr2

Arduino M0 Pro (Arduino Zero)でタイマー割り込み

http://ehbtj.com/electronics/arduino-m0-hacks/ PWMは2, 3, 4, 5, 6, 7ピンが使えなくなる、とのこと int pin_ovf_led = 13; unsigned int irq_ovf_count = 0; void setup() { pinMode(pin_ovf_led, OUTPUT); digitalWrite(pin_ovf_led, LOW); REG_GCLK_CL…