Pages: [1]   Go Down
Author Topic: Newbie help  (Read 4549 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all totally new to this Bought the atmega328 and the 3x2 lcd shield

I am planing on this controlling a bank of leds with dimming by pwm in the future but for now try to get to grips

I am entering this code in to 0022

//example use of LCD4Bit library

#include <LCD4Bit.h>
//create object to control an LCD. 
//number of lines in display=1
LCD4Bit lcd = LCD4Bit(1);

//some messages to display on the LCD
char msgs[6][15] = {"apple", "banana", "pineapple", "mango", "watermelon", "pear"};
int NUM_MSGS = 6;

void setup() {
  pinMode(13, OUTPUT);  //we'll use the debug LED to output a heartbeat

  lcd.init();
  //optionally, now set up our application-specific display settings, overriding whatever the lcd did in lcd.init()
  //lcd.commandWrite(0x0F);//cursor on, display on, blink on.  (nasty!)
}

void loop() { 
  digitalWrite(13, HIGH);  //light the debug LED

  //pick a random message from the array
  int pick = random(NUM_MSGS);
  char* msg = msgs[pick];
 
  lcd.clear();
  lcd.printIn(msg);
  delay(1000);
  digitalWrite(13, LOW);
 
  //print some dots individually
  for (int i=0; i<3; i++){
    lcd.print('.');
    delay(100);
  }
  //print something on the display's second line.
  //uncomment this if your display HAS two lines!
  /*
  lcd.cursorTo(2, 0);  //line=2, x=0.
  lcd.printIn("Score: 6/7");
  delay(1000);
  */
 
  //scroll entire display 20 chars to left, delaying 50ms each inc
  lcd.leftScroll(20, 50);
}


Now i get these messages at the bottom

avrdude: stk55_getsync(): not in sync resp:0x30
avrdude: stk55_disable () protocol error, expect 0x14, resp=0x51

Can some one tell me in English please lol

Cheers

Kev
Logged

Copenhagen, Denmark
Offline Offline
Edison Member
*
Karma: 32
Posts: 1199
Have you testrun your INO file today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have not set the correct board type in the Tools menu for the board you have connected?
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried all of them same response

This is mine

   
Arduino Duemilanove ATMEGA328

so the board second one down
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also checked correct COM port??  Installed drivers??

What computer and OS are U using??
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes sorry i had the wrong port settings

I have the LCD Keypad shield on Arduino for now but will be getting the nokia 3310 lcd shield with joystick

Now when i try to upload programs to the arduino from the example  lcd4bit example all i get is a corrupted display also i guess the liquid crystal examples are for the bigger types of displays not the 16x2 or which ever i have

Sorry i will get the hang soon

Kev

Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry i will get the hang soon 


Only be sorry for not asking questions!

This stuff (electronics, Microcomputers) is always like this in the beginning. Invisible things don't work. Slow down and check stuff out.  Check the site you bought the LCD shield from for more detail on use and examples..

And, "Electricity Is Invisible", so buy a cheap LCD Multimeter if you don't have one ($5 on Ebay)..

I have some beginner stuff on a website: http://arduino-direct.com  don't repost this for now: user=kaust pass=student as It's Unfinished!

Have fun!
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did used to make electronic kits but a fair few years ago but never got in to any programming, Got soldering irons multimeters etc but to what i am used to this is a step up

I want to be able to make a fish tank controller need the arduino to have an rtc and fancy a colour touch screen will need to set up 3-4 pwm outputs to control the leds via bucks

There is a thread where all the info is available but the blokes used an 3310 nokia shield with joystick so dont know how much more work it will be to alter his code for the colour touch screen

Just getting lcd smartie running via the pc

Kev

Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Terry King i shall have a look now

Got the lcd smartie on comes up on the lcd and scrolls but its all jargon must of done something wrong lol

Kev
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have all plugged-in shields etc, no breadboard or jumpers?? 

Then MAYBE there is a bent pin, a bad solder joint, a short somewhere. Look all the boards over with a magnifier (which I have to use for everything  smiley   )

Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The lcD plugs straight in to the board works on everything else i am sure i am doing something wrong

Oh flip i saved the updated lcd pin file in the arduino folder with some other sketches and now there gone heck lol


Logged

Pages: [1]   Go Up
Jump to: