i have an Arduino MEGA.
**
this is what im trying to do:
go to: 3:38
**
i am trying to use pin 12 to power a 12V halogen light. i do not currently have a breadboard so i am just connecting by simple wire. it works when i connect to the 5V or 3.3V socket, but not pin 12 (PWM).
it was configured correctly i believe, so i checked with a multimeter, the result is between ground and pin 12 i get 5V.
i am very new to electronics, so i do not not how it is possible to have a voltage but no current/power. my guess is that there is some resistance in the arduino, therefore it could be a configuration issue.
when i measured the voltage (with a multimeter) while connecting the halogen light simultaniously (quite hard to perform with 2 hands) i get only 0.3V.
have also tried using other pins including digital and analog, with no success.
here is the code:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(12, OUTPUT);
pinMode(A0, OUTPUT);
pinMode(32, OUTPUT);
Even if the Arduino could supply enough current to light the bulb how bright would you expect it to be ?
The video shows an LED but you sayDo you appreciate the difference between an LED and your halogen light ?
thank you for your help (and all of the others).
i have noticed this (the Uno/Mega issue), but i have measured the difference between high and low and it 5V of difference. i have also tried putting in '1' now that you suggested this and it works like 'HIGH'.
currently it is a holiday so i am stuck with the halogen (pun unintended). but it works even with the 3.3 pin in the arduino.