EasyManua.ls Logo

Joy-it PRO MICRO - Code Example and Functionality; LED Blink Example

Joy-it PRO MICRO
5 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4. CODE EXAMPLE
Now you can copy the following sample code into your IDE and upload it
to your your Pro Micro.
The program makes the two built-in LEDs on the RX and TX line blink
alternately.
/* the setup function runs once when you press reset or
power the board*/
void setup() {
/* initialize digital pin LED_BUILTIN as an output.*/
pinMode(17, OUTPUT);
pinMode(30, OUTPUT);
}
/* the loop function runs over and over again forever*/
void loop() {
digitalWrite(17, HIGH); // turn the LED on
digitalWrite(30, LOW); // turn the LED off
delay(1000); // wait for a second
digitalWrite(17, LOW); // turn the LED off
digitalWrite(30, HIGH); // turn the on
delay(1000); // wait for a second
}

Related product manuals