How to attach a callback function to the arduino input pin

조회 수: 3 (최근 30일)
Risith Ravisara
Risith Ravisara 2017년 9월 28일
편집: Risith Ravisara 2017년 9월 28일
I have 9 led bulbs and 2 pushbutton(not gui button) 9 leds set to 2-10 pins as output. 2 pushbtn set to 12 and 13 as input.
when:
press 1st pushbtn ----> 1st led turn on.
press 2nd pushbtn ----> 2nd led blink forever.
again press 1st pushbtn ----> 3rd led trun on.
again press 2nd pushbtn ----> 4th led blink forever.
again press 1st pushbtn ----> 5th led trun on.
likewise finally 5 leds turn on and 4 leds blink.
This is the task i want to do with matlab using arduino uno. (can't use mega board) I hope this can be done by callback function. but i dont know how to do it.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by