Page 1
2023/05/05 21:45 Arduino for ODROID-GO - Blue LED and PWM Arduino for ODROID-GO - Blue LED and PWM Make sure that you've followed these guides. Getting started with Arduino Arduino for ODROID-GO - Hello World Refer to the Arduino official documents. This tells us useful common functions with great instructions.
Page 2
Last update: 2018/06/11 odroid_go:arduino:03_blue_led_and_pwm https://wiki.odroid.com/odroid_go/arduino/03_blue_led_and_pwm?rev=1528687521 12:25 Let's make the LED blinks permanently. Open a new sketch by pressing the shortcut CTRL-N. You're able to control that LED very easily. The pin number for the LED is 2. Define that with Preprocessor.
Page 3
2023/05/05 21:45 Arduino for ODROID-GO - Blue LED and PWM Give the LED to breathing effect With adjusting analog output value, as known as PWM, we can make the LED breathing. Arduino gives us wrappers that helps control of GPIO pins, as well as to control of PWM features.
Page 4
Last update: 2018/06/11 odroid_go:arduino:03_blue_led_and_pwm https://wiki.odroid.com/odroid_go/arduino/03_blue_led_and_pwm?rev=1528687521 12:25 void loop() { // put your main code here, to run repeatedly: And control the pin mode of the LED to output. It might be not a necessary step, but to make sure. #define PIN_BLUE_LED...
Page 5
2023/05/05 21:45 Arduino for ODROID-GO - Blue LED and PWM ledcAttachPin(PIN_BLUE_LED, PWM_CHANNEL); ledcSetup(PWM_CHANNEL, 12000, 8); void loop() { // put your main code here, to run repeatedly: pinVal >= 0; pinVal--) { ledcWrite(PIN_CHANNEL, pinVal); delay(3); pinVal < 256; pinVal++) { ledcWrite(PIN_CHANNEL, pinVal);...