I tried a simple onboard light bulb flashing effect: I compiled the logic through Code Blocks, translated it into C++ language, and burned it into the Arduino Nano to display the effect.
on start - void set up() {...} // Just start one time for first run
forever - void loop() {...}// loop forever
digital write pin Dx =0/1 - digitalWrite(x,LOW/HIGH)//digital OUTPUT for HIGH=1=5V/3.3V or LOW=0V
analog write pin Dx = v - analogWrite(x,v); // value from 0~255, can stimulate Voltage to change the light of leds or speed of motor.
pause(ms) - delay(ms);//delay for ms, like delay (1000) means delay 1 second