2017年11月04日

OLED簡易オシロスコープの製作@ポートの設定(暫定)

DigoleSerialDisp mydisp(1,5,14); //SPI: Pin 1:data, 5:clock, 14:SS, you can assign 255 to SS, and hard ground SS pin on module

#define buttonPin01 2 // Button Pin on D2
#define button_State1 (CORE_PIN2_PINREG & (1<<0))

#define buttonPin02 3 // Button Pin on D3
#define button_State2 (CORE_PIN3_PINREG & (1<<12))

#define buttonPin03 4 // Button Pin on D4
#define button_State3 (CORE_PIN4_PINREG & (1<<13))

#define LED 6  //Blue LED
#define LED_ON (CORE_PIN6_PORTSET = (1<<4))
#define LED_OFF (CORE_PIN6_PORTCLEAR = (1<<4))

#define LEDgrn 19
#define LEDgrn_ON (CORE_PIN19_PORTSET = (1<<2))
#define LEDgrn_OFF (CORE_PIN19_PORTCLEAR = (1<<2))

#define LEDred 18
#define LEDred_ON (CORE_PIN18_PORTSET = (1<<3))
#define LEDred_OFF (CORE_PIN18_PORTCLEAR = (1<<3))

const int ad_ch0 = 20; // Analog 0 pin for channel 0
const int ad_ch1 = 21; // Analog 1 pin for channel 1

posted by Yasuski at 12:59| Arduino