Hi !
I need some help from experts, and I really hope someone can find a solution to my problem. I appreciate any and all help.
I'm a Portuguese Electronics Student and i just started using micro-controllers, so I decided to try out Arduino, and bought an Arduino Uno.
For a first project to start using Arduino e sketched a Temperature Sensor using an LM35 and an 16x2 LCD. I sketch my program and waited a while for it to upload, and it said "Upload successful", but the problem is that nothing ran on the Arduino. I looked in the troubleshooting guide, and i didn't find solution unfortunately .
I already checked all my jumpers and they are all OK, i also uploaded the Blinking Led project and it did run, so the ATMEGA is fine. I really don't know what else to do, because i think my sketch is fine.
here's the sketch so you can see if its ok:
#include <LiquidCrystal.h>
int sensor = 0;
int Ventrada;
float Temperatura;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
lcd.print("A Iniciar...");
delay(3000);
lcd.print("Temperatura: ");
}
void loop()
{
Ventrada = analogRead (sensor);
Temperatura=(500*Ventrada)/1023;
lcd.setCursor(0, 1);
lcd.print(Temperatura);
lcd.print(" C"); // Celsius
delay(1000);
}
Can anyone help me?
By the way, the led L is constantly on, in the colour red.
Another doubt i have is, i connect my arduino board to my PC with the usb cable, so is the right programer AVRISP mkll ?
Thanks, Much Appreciated to everyone.