Ticker 를 살렸다.

 

참고 사이트 : https://github.com/esp8266/Arduino/tree/master/libraries/Ticker

 

----------------- 소스  -----------------------

 

#include <Ticker.h>

#define LED D0


Ticker flipper;
unsigned int prt_index = 0;
void flip_test();


// the setup function runs once when you press reset or power the board
void setup() {
  Serial.begin(115200);
  delay(10);
  Serial.println("Start..");
 
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED, OUTPUT);

  flipper.attach(0.3, flip_test);    //start , ms
  //flipper.detach(); //stop
 
}

// the loop function runs over and over again forever
void loop() {
 
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

void flip_test()
{
  prt_index ++;
  Serial.printf("%d",prt_index);
}

 

-----------------------------------------------

 

그외 사항 :

 

1. 기본 소스는 Ver 1.0 이다. 좀더 발전시킨 Ver 2.0 이 있다.

 

https://github.com/sstaub/Ticker

 

Ticker-master.zip

 

 

 

2. TickerScheduler 도 참고할만한것 같다.

 

https://github.com/Toshik/TickerScheduler

 

TickerScheduler-master.zip

 

 

 

 

'공부 > arduino' 카테고리의 다른 글

nodeMCU 참고 사이드  (0) 2018.03.10
nodeMCU pin MAP 다시보기  (0) 2018.03.09
아두이노 멀티 장비 설정  (0) 2018.03.07
nodemcu led 구동  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06

아두이노에서 여러개의 보드를 사용하고자 한다면 아래와 같은 방법을 사용

 

환경설정에서 사용하고자 하는 장비의 json 주소 링크를 한다.

 

 

툴 > 보드 > 보드메니져 에서 사용하고자 하는 장비 검색후 인스톨 사용

 

그럼 아래와 같이 여러개의 환경이 등록 된것을 확인 할수 있다.

 

 

'공부 > arduino' 카테고리의 다른 글

nodeMCU pin MAP 다시보기  (0) 2018.03.09
nodeMCU 타이머(Ticker)살리기  (0) 2018.03.09
nodemcu led 구동  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06
nodeMCU 아두이노 설정  (0) 2018.03.06

--------- 예제 소스 수정 -------------------------------------

 

#define LED D0

 

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED, OUTPUT);
}

 

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

 

 

--------- 다운로드 하면 아래 메세지 출력  ------------------

 

스케치는 프로그램 저장 공간 247051 바이트(23%)를 사용. 최대 1044464 바이트.
전역 변수는 동적 메모리 32864바이트(40%)를 사용, 49056바이트의 지역변수가 남음.  최대는 81920 바이트.
Uploading 251200 bytes from C:\Users\bigwa\AppData\Local\Temp\arduino_build_669391/Blink.ino.bin to flash at 0x00000000
................................................................................ [ 32% ]
................................................................................ [ 65% ]
................................................................................ [ 97% ]
......                                                                           [ 100% ]

 

 

'공부 > arduino' 카테고리의 다른 글

nodeMCU 타이머(Ticker)살리기  (0) 2018.03.09
아두이노 멀티 장비 설정  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06
nodeMCU 아두이노 설정  (0) 2018.03.06
아두이노 Nuvoton 관련  (0) 2018.03.05

1. 통신속도 115200

2. 보드 모양

 

 

참고 : https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/

 

 

GPIO2(D4) 에 LED 있음 -> 통신시 LED 로 확인 가능

GPIO16(D0) 에 LED 있음 -> 일반 구동 확인 가능

 

RST 버튼 은 RESET용

FLASH 버튼 + 전원 ON 또는 FLASH 버튼 + RST 하면 boot 로더진입 해서 신규 ROM 다운로드 가능

단 esptool 또는 아두이노는 자동으로 다운로드진입 해서 별도작업 필요 없음

 

GPIO0(Flash버튼) -> 일반구동시 KEY 입력으로 사용 가능

 

 

'공부 > arduino' 카테고리의 다른 글

아두이노 멀티 장비 설정  (0) 2018.03.07
nodemcu led 구동  (0) 2018.03.07
nodeMCU 아두이노 설정  (0) 2018.03.06
아두이노 Nuvoton 관련  (0) 2018.03.05
아두이노에 STM32 사용설정  (0) 2018.03.05

1. http://arduino.esp8266.com/stable/package_esp8266com_index.json

2. 보드메니져에서 esp8266 선택

3. NodeMCU V1.0 선택후 사용

'공부 > arduino' 카테고리의 다른 글

nodemcu led 구동  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06
아두이노 Nuvoton 관련  (0) 2018.03.05
아두이노에 STM32 사용설정  (0) 2018.03.05
아두이노 설치  (0) 2018.03.05

SSR 관련 참고 문서

 

1736_cat_guide_hsr_kr.pdf

 

'공부 > 전자회로_부품' 카테고리의 다른 글

TR FET 안전하게 사용하는 방법  (0) 2018.04.06
광전송으로 구현한 OPAMP  (0) 2015.04.03
Metrix LED 드라이버 IC  (0) 2015.04.03
AC 용 isolated ADC  (0) 2015.03.26
Magnetic Buzzer  (0) 2015.03.26

1. 참고 사이트

 

http://www.nuvoton.com/hq/support/tool-and-software/development-tool-hardware/numaker-uno/?__locale=en

 

2. 설정 내용

 

Arduino IDE & Board Installation Guide

1. Download and Install the Nu-Link USB Driver.
2. Download Arduino IDE from https://www.arduino.cc/
3. Run Arduino IDE installer to install it on PC.
4. Run Arduino IDE.
Go to File → Preferences, enter the following URL to textbox of ‘Additional Board Manager URLs’
https://raw.githubusercontent.com/OpenNuvoton/NuMaker-UNO/master/package_nuvoton_index.json
5. Arduino IDE : go to Tools → Board → Boards Manager
6. NuMaker UNO will show up on the list, select NuMaker UNO and click install.
After the package download is finished, go to Tools → Board and select NuMaker UNO to use it.

 

 

'공부 > arduino' 카테고리의 다른 글

nodemcu led 구동  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06
nodeMCU 아두이노 설정  (0) 2018.03.06
아두이노에 STM32 사용설정  (0) 2018.03.05
아두이노 설치  (0) 2018.03.05

1. 설치된 아두이노의 파일 > 환경설정메뉴 선택

 

 

2. 환경설정에 URLs 설정

 

 

http://dan.drown.org/stm32duino/package_STM32duino_index.json

 

3. 툴 > 보드메니저 에서 관련 항목 인스톨

 

 

 

 

 

4. 선택후 사용

 

 

 

 

 

 

'공부 > arduino' 카테고리의 다른 글

nodemcu led 구동  (0) 2018.03.07
nodeMCU H/W특징  (0) 2018.03.06
nodeMCU 아두이노 설정  (0) 2018.03.06
아두이노 Nuvoton 관련  (0) 2018.03.05
아두이노 설치  (0) 2018.03.05

+ Recent posts