Hello together
first of all english is, like u will see soon, not my motherlanguage so iam sure iam gonna do here and there some mistakes i still hope u will understand everything iam writting. My name is Marco and iam new here and trying to learn the programming with Arduino Uno. I already have some knowlege about programming with C++. But i already have problems with the 2ten Circuit of the Handbook for beginners.
The Problem is, that the light is shining constantly and nothing is changing when iam turning the potentiometer. First i thought maybe my potentiometer is broken but when i tryed circuit 6 its didnt work too. I think something is wrong with my A0 Analog In pin. I hope someone can help me.
used code [Edit]:
int sensorPin=0;
int ledPin = 13;
void setup()
{
int sensorValue;
}
The code should be in the loop() function which is run continuously instead of the setup()function which is just run once after every start-up or reset. Also the setup function should contain a pinMode() function call setting the ledpin as an output.
Ah yes sorry again...mistake by writting from the secound screen sorry. The code is working i mean i can make it on the board so the problem is not that iam doing this kind of mistakes i think the problem is "deeper"
thanks for the correction
Thank u for u answere first.
The LED is constant on. No shaking or something like that even when iam turning on the potentiometer.
The LED on the Board next to the pin 13 is shining constant too.
I made the LED away ==> The LED on the Board next to the pin13 is still shining constant.
I made the LED back on his position and made the Cable of A0 Analog In away ==> the LED and the LED on the board is blinking on and off.
I made a small video that u can see it by ur own i hope it will help to understand my problem
thank u again for ur help
Iam using 5V for the port.
I tryed your code but i really have no idea how to read it. I used serial monitor to "show" me something i hope this is right. Now its showing me "B"s or rectangels and all of them very quick...
Ok but what should i do know? I already finished circuit 3 and 4 without a problem and i really start having the feeling that the A0 analog IN doesnt work... how can i find out if its the potentiometer or the analog in? Dont wanna send the Arduino UNO back with the result it wasnt the fault of the board. Could it be wrong treiber? (i dont know if treiber is used in english i mean the software u have to install that the PC can understand the hardware)
Do you have a voltmeter?
Better yet, hook your external LED directly to the middle pin on the pot with the other end of the LED to ground and see if you can control the brightness of it.
Open a new blank sketch, then simply copy the new code in it, upload it to the arduino and open the Serial monitor. If you see numbers increase as you turn the pot, then the pot is good.