successful uploading but no results ?

Needless to say, complete beginner to Arduino,, Have Uno R3 board ,'Blink' already installed, loaded 'Hello World' from examples , compiled OK. and uploaded.. BY the way have connected I2C all 'squares' show OK and contrast adjusted , --- just blank. Port Com3 being used and nothing shows on the serial monitor ?? As always any advice greatly appreciated

Vs6gy:
Needless to say, complete beginner to Arduino, Have Uno R3 board ,‘Blink’ already installed, loaded ‘Hello World’ from examples , compiled OK. and uploaded… BY the way have connected I2C all ‘squares’ show OK and contrast adjusted , — just blank. Port Com3 being used and nothing shows on the serial monitor ?? As always any advice greatly appreciated

An Arduino Uno and some sort of display.

Who knows what could be wrong!

.

Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it’s ok to add it as an attachment. Don’t put your code in some external file service like dropbox, etc. We shouldn’t need to go to an external website just to help you. I do feel it’s reasonable to post a link to code hosted on GitHub or similar code hosting sites since that’s an platform specifically designed for this sort of thing

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you’re using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.

When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

If you are new , run a few examples . Start with blink- upload it , change the flash rate, upload again .

Baby steps first

Hammy, have done that , even though ,as I say, 'Blink' was pre-loaded. Used the 'Examples' from Arduino IDE menu, Uploaded the sketch and all OK, hence my going a step further and trying 'Hello World' , just to get the 'feel' of things ! beginning to suspect the I2C display itself ,, as a complete 'newby' I'm just guessing ! thanks

pert:
Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it’s ok to add it as an attachment. Don’t put your code in some external file service like dropbox, etc. We shouldn’t need to go to an external website just to help you. I do feel it’s reasonable to post a link to code hosted on GitHub or similar code hosting sites since that’s an platform specifically designed for this sort of thing

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you’re using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.

When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

Thanks Pert for the input.. I did point out that I was indeed, an absolute beginner!! Having a job in trying to 'get to grips' with the fundamentals , without 'posting ' a sketch which I assumed was 'foolproof'and had in fact ,loaded satisfactorily .. I suppose when you are an "expert" ? on the subject, you tend to take for granted , the basics, needed, for people such as myself . I really do appreciate what you are saying and suggesting, -but- again, I am hardly on the first step of the learning curve.... Must try harder many thanks

Why are you so resistant to just providing the information I requested?

Vs6gy: I suppose when you are an "expert" ? on the subject, you tend to take for granted , the basics, needed, for people such as myself .

First of all, I'm not an expert. I'm just someone who tries my best to help people out on the forum. I'm sorry if that offends you.

Second, what part of what I wrote makes you think I'm taking for granted that you have "the basics, needed"? I asked you to provide the basic amount of information that we would need to start helping you and told you exactly how to do that correctly.

In fact, I think it's you who's taking for granted that I'm, not only an expert, but also a psychic who knows exactly what the hell you mean when you write "'Hello World' from examples".

Oh dear, seems I've upset you , sorry about that. From my point of view, I class you as an " expert", compared with myself.. I fully appreciate that you are indeed trying to help people such as I, but again, never having used Arduino boards before,and most certainly never had cause to 'post a sketch', , silly as it sounds, I have to take the 'plunge' , and have a go.. Please bare with me , if not , thanks anyway...

``

#include <LiquidCrystal.h>


/*
  LiquidCrystal Library - Hello World

  Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
  library works with all LCD displays that are compatible with the
  Hitachi HD44780 driver. There are many of them out there, and you
  can usually tell them by the 16-pin interface.

  This sketch prints "Hello World!" to the LCD
  and shows the time.

  The circuit:
   LCD RS pin to digital pin 12
   LCD Enable pin to digital pin 11
   LCD D4 pin to digital pin 5
   LCD D5 pin to digital pin 4
   LCD D6 pin to digital pin 3
   LCD D7 pin to digital pin 2
   LCD R/W pin to ground
   LCD VSS pin to ground
   LCD VCC pin to 5V
   10K resistor:
   ends to +5V and ground
   wiper to LCD VO pin (pin 3)

  Library originally added 18 Apr 2008
  by David A. Mellis
  library modified 5 Jul 2009
  by Limor Fried (http://www.ladyada.net)
  example added 9 Jul 2009
  by Tom Igoe
  modified 22 Nov 2010
  by Tom Igoe
  modified 7 Nov 2016
  by Arturo Guadalupi

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

First thing you have included twice the LiquidCrystal library. Second thing I always used LiquidCrystal lcd (8, 9, 10, 11, 12, 13); Third thing, if you are using an I2C LCD screen, you have to install the I2C library.

speedylearner, thanks , Yes I agree , I did include Liquidcrystal, did'nt realise twice, was not acceptable.! I also thought I had uploaded the I2C library ..! just shows, How little I know , . Ah well , must keep trying .. cheers

Vs6gy: BY the way have connected I2C

I'm going to interpret this vague statement to indicate you have some device connected to the I2C pins on your Arduino Board.

Vs6gy: all 'squares' show OK and contrast adjusted , --- just blank.

I'm going to interpret this vague statement to mean the device is an LCD.

Vs6gy: ``` you can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD and shows the time.

The circuit:  LCD RS pin to digital pin 12  LCD Enable pin to digital pin 11  LCD D4 pin to digital pin 5  LCD D5 pin to digital pin 4  LCD D6 pin to digital pin 3  LCD D7 pin to digital pin 2  LCD R/W pin to ground  LCD VSS pin to ground  LCD VCC pin to 5V  10K resistor:  ends to +5V and ground  wiper to LCD VO pin (pin 3)

So now you're using an example sketch that clearly tells you how to connect an LCD to your Arduino NOT using the I2C pins and you're surprised when it doesn't work?

You can't use the LiquidCrystal library with an LCD display that has an I2C interface. That library is written for direct connection to the HD44780 driver chip.

If you are using I2C you'll need to use a different 3rd party library. There are a few different options. I'm not sure which is best because I haven't worked with any of them but any of them will work. Maybe some other forum members will chime in on which is best. You'll need to use the example code that comes with whichever library you use rather than the one you have there because likely the API is a little different.

Here are some of the commonly used ones:

Vs6gy: a sketch which I assumed was 'foolproof'and had in fact ,loaded satisfactorily ..

Bad assumption. You always need to make sure you're using a library that's compatible with your hardware. You can't assume that accessories that fits within a general category are interchangeable.

Do you see now how important it is to provide sufficient information when you ask for help on the forum? If you had posted all this from the start you would have had a solution within minutes.

Ah !, now pert, many thanks for bearing with me,must be frustrating sometimes, trying to help an incompetent.. You have enlightened me somewhat on quite a few points, especially in the use of a dedicated L2C display., you know what I mean ,I think it is described as a 1602 with a 'backpack' ! module!! Another confusing (to me ) thing , is the Library , As , (i repeat) a complete newbie, I am now beginning to realise to just how important the library is , and its obvious association to a given 'sketch' ? Incidentally, I read , that some people prefer independent libraries in place of Arduino !! ? but that's another issue ! I now intend to re-cap and try to digest all your remarks,etc, and, I repeat, " any help, of course, including your's, is gratefully appreciated". Bit ' long in the tooth' here but must try and keep the remaining brain cells active ? Again many thanks, for your efforts , best wishes

Vs6gy:
especially in the use of a dedicated L2C display., you know what I mean ,I think it is described as a 1602 with a ‘backpack’ !
module!!

The “I2C backpack” is nice because it means you only use up two I/O pins on your Arduino for the display instead of the six that would be required without it.

Vs6gy:
Another confusing (to me ) thing , is the Library , As , (i repeat) a complete newbie, I am now beginning to realise to just how important the library is , and its obvious association to a given ‘sketch’ ?

A library is just a collection of code packaged so that it’s easy to share between multiple projects rather than having to copy/paste the same code into each one. Arduino users tend to treat them as a “black box” but you can always open up the source files in a text editor and have a look. They use the same C++ language you are writing your sketches in.

Vs6gy:
and its obvious association to a given ‘sketch’ ?

To use a library in your sketch you add an #include directive for its header (.h) file. For example:

#include <LiquidCrystal.h>

After that, you can use the functions of that library in your sketch. These functions are know as the API (application programming interface). Display libraries tend to have similar APIs but usually they are not exactly the same. For example, to define the pins you have your LCD connected to with the LiquidCrystal library you do this:

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

But with the https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library library the equivalent code looks like this:

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

It wouldn’t make sense for the APIs to be the same in this case because the fdebrabander library is for the I2C display and so it doesn’t need you to tell it which pins the display is connected to since obviously it’s connected to the I2C pins.

So if you tried to use a sketch written for the LiquidCrystal library with the LiquidCrystal_I2C library you’ll have a compilation error. Since the APIs are very similar, you would only need to make a couple changes to that sketch to make it compatible.

Arduino libraries can have example sketches bundled with them. After installing the library, you will find its examples under the File > Examples > {library name} menu.

Vs6gy:
Incidentally, I read , that some people prefer independent libraries in place of Arduino !! ? but that’s another issue !

In that context, probably what they were referring to are the Arduino core libraries. The Arduino IDE automatically adds this line to all sketches:

#include <Arduino.h>

This library is what gives you all the standard Arduino API functions like digitalWrite(), digitalRead(), analogRead(), Serial.print(), etc. You need to be skeptical of the information about Arduino you read from the people who don’t use it. Although they may be very knowledgeable in general, these people don’t use Arduino so they don’t know much about it, yet they go around spewing misinformation. You’ll get more accurate complaints about Arduino from someone who uses it regularly. In fact, it’s possible to prevent the Arduino core libraries from being included in an Arduino sketch if for some reason you really didn’t want access to all those useful functions.

My apologies pert, for the delay in replying.. Phew,! that last post was so informative, I read it through a couple of times,before a glimmer of light came through.. Must confess , had not really attached much importance to libraries as such, NOW, well after your explanation I realise just how important a good library is. Especially in my case the , Liquid Crystal .. and the Liquid Crystal-I2C.. are totally different entities.. Slowly , hopefully-surely! I will eventually see 'the light', such a lot to learn , and so little time to do so.. ! However, you have most certainly given me a lot to think about, and of course , greatly appreciated. My initial intention was to use the Arduino to read the values of a 'variable capacitance' (such wishful thinking !) .. Now I must have to reset my reasoning . I don't suppose I will ever be able to read or write C+ as such ( the only code I can read is 'Morse' !!) With all your info I will at least, have a go at 'righting my wrongs', with the use of libraries top-most in my mind. The Github examples to my mind , seem a bit more logical, but then; who am I to judge ? Your remarks regarding the use of alternative libraries , duly noted, " horse for courses" comes to mind.... For now pert , let me 'stew in my own juices ', and will, with some hope, announce a degree of success at a later date ? Again; my thanks for your admirable patience and great help, best wishes..