Low power output?

let me start by saying... I am brand new at this...

ok... so I think I may have broken my board.

I was working on project 6, using a servo, and got it successfully working. The main power source has been USB to my laptop.

I was curious if I could run it off a 9v battery and after trying a few different spots, the servo was not responding correctly, and then stopped altogether.

I cleared everything and tried running the simple blinking program again, and pin13 led lights up slow and not completely. When I upload the program, the led is bright so I know it's not broken there. But once it tried to run, it's not working.

Not sure how else to test where the problem is.

Project 6 of what?

Please, put the 9V battery back in your smoke detector or 1970s transistor radio - it's not built to drive motors

With the blink sketch, in setup() make sure you set pin 13 to output.

It is.

It is the baseline programming given as an example in the book and is directly imported.

with nothing else going on, the built in led will slowly light up, and not blink.

Hello rando_tron232

Post your sketch, well formated, with comments and in so called code tags "</>" and schematic to see how we can help.

Have a nice day and enjoy coding in C++.

Which book?

Arduino's "Project Book" included with the starter kit.

Never read it.
Can you post the code direct from the IDE?

That's interesting and unusual.
Tell us more

/*
  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.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, 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
}

How are you powering this?
Are you sure the LED is fading up?
Did you get rid of the smoke alarm battery?

powered by USB from laptop. Prior to my bonehead move with the 9v, it was working fine on all projects.

When I upload, the led shines bright. Once upload is complete, the led goes dark and very slowly lights up, never reaching full value nor blinking.

Here is a YouTube video I just made for visual reference.

Just to be 100% sure, try this:


void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(13, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

Done, same result.

Try this with external LED with 220R on pin 12.


void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(12, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(12, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(12, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

Similar to D2 circuit.

Clearly this is nothing to do with getting the IDE to work, it is your project. So I have moved this thread here.

still nothing.

One more test.

Move the external LED to pin 7 and make appropriate sketch changes to reflect this.

Show a good image of the external LED connections.

Still nothing