Welcome, Guest
Username: Password: Remember me

TOPIC: Blinking LED program.

Blinking LED program. 2 years 4 months ago #1231

  • Ray
  • Ray's Avatar
  • Moderator
  • Posts: 698
  • Thank you received: 149
  • Karma: 43
This simple program just blinks the pedalsHIELD MEGA LED together with the small led placed on the Arduino Board. Both LEDs (the one on the shield and the one on the Arduino board) should blink together:
  • If the LED on the Arduino Board does not blink: Unplug the shield and try again, if it still does not work you may have a faulty Arduino Board, load more example projects from File\Examples\... and double check that your Arduino board works
  • If the LED on the pedalSHIELD Board does not blink: Make sure that you did not soldered the LED reversed (Check the How To Build Manual again). You can measure with a multimeter on the LED pin (the one facing the bottom of the shield) and you should see the pin alternating from 0 to 2.5V

This code is an exact copy of the one you can find at the Arduino IDE File\Examples\01.Basics\Blink
  Turns an LED on for one second, then off for one second, repeatedly.
  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  This example code is in the public domain.
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
The administrator has disabled public write access.
Time to create page: 0.204 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio