Keyestudio KS0436 Kit Manual page 174

Table of Contents

Advertisement

1) Connect the
Upload Code:
2) Open the program in the code folder- Circuit 15, or directly copy and
paste the code below on the Ardunio IDE.
3) Select UPLOAD to program the sketch on the UNO Board.
#define SensorLED
#define SensorINPUT
unsigned char state = 0;
void setup()
{
pinMode(SensorLED, OUTPUT);
pinMode(SensorINPUT, INPUT);
attachInterrupt(0, blink, FALLING);//D2 as external interruption 0,
when there is falling trigger and call blink function
}
void loop()
{
if(state!=0)
{
REV4
Board to a USB port on your computer.
13
2
174

Advertisement

Table of Contents
loading

Table of Contents