my terminal window is not showing up anything

Hello,

I have trouble and I would appreciate a help here.

When I used the sample code from the GitHub - ryantm/LSM303DLH: This library is no longer recommended. It has been superseded by https://github.com/pololu/lsm303-arduino to test out
the serial code so that I can get the output as they got from the example output and I hit
"Serial Monitor" button to get the terminal window to show up the results but nothing
is showing up on the terminal window. Why is that?

All other works such as when I hit compile or upload and I can upload everything to my
Arduino uno board just fine by using the codes from the website GitHub - ryantm/LSM303DLH: This library is no longer recommended. It has been superseded by https://github.com/pololu/lsm303-arduino

but when I try to hit the "serial monitor" button to try to get the output that they are getting
from that website, I'm not getting anything on the terminal window.

Can anyone please help me?

thank you very much

How have you hooked up the compass?

Yes I hooked up the LSM303DLH digital Compass

as shown from the website: GitHub - ryantm/LSM303DLH: This library is no longer recommended. It has been superseded by https://github.com/pololu/lsm303-arduino

Arduino Uno/Duemilanove LSM303DLH Carrier
5V -> VIN
GND -> GND
Analog Pin 5 -> SCL
Analog Pin 4 -> SDA

and I hooked it up such that it meets the criteria above. is there anything I'm doing wrong?

Add some Serial.print() statements to verify the code is running. e.g. in setup() add:
Serial.println("Running...");

then in loop() before the compass call, Serial.print(".") and after the compass call Serial.println("!")

See what the results in

I tried doing what you told me... still nothing is showing up.

Scale back to the simplest program.

Only have a serial statement in setup that says "Setup" and one in loop that says "loop". If that isn't returning anything, you have a more fundamental issue.

This code is what I used to try to have the terminal window show bunch of results from 0 to 359

#include <LSM303DLH.h>
#include <Wire.h>



LSM303DLH compass;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  compass.enableDefault();
}


//void LSM303DLH::calibrate(void)

void loop() {
  
      compass.calibrate();
      compass.read();

	int respond = 0;
	
	Serial.println("Hit any key when ready to calibrate.");
	//wait till R is pressed
	while ( respond == 0)
		{
		while (Serial.available()==0);; 


		while (Serial.available()>0)
			{
		 	respond = Serial.read();
 			}
		}
       

	Serial.println("Rotate board until Min and Max values are reched for all axis.");
        Serial.println("WHen calibration done press D...");
		 delay(3000);

	while (respond != 100) 	
	    {
	
                 while (Serial.available()==0)
                   {
                     
		 //Loop till D is pressed

		 compass.read();
  	
   		if (compass.m.x > compass.m_max.x)
    	 	 {
     	 	  compass.m_max.x = compass.m.x;
   	 	 }
  		if (compass.m.y > compass.m_max.y)
    	 	 {
      	 	  compass.m_max.y = compass.m.y;
    	 	 }
   		if (compass.m.z > compass.m_max.z)
    		 {
    	 	  compass.m_max.z = compass.m.z;
    	 	 }
   		if (compass.m.x < compass.m_min.x)
    	 	 {
     	 	  compass.m_min.x = compass.m.x;
    	 	 }
    
    		if (compass.m.y < compass.m_min.y)
    	 	 {
      		  compass.m_min.y = compass.m.y;
    	 	 }
    
    		if (compass.m.z < compass.m_min.z)
    	 	 {
      		 compass.m_min.z = compass.m.z;
    	 	 }
		//Display results
  
  /////////////
     		if (compass.a.x > compass.a_max.x)
    	 	 {
     	 	  compass.a_max.x = compass.a.x;
   	 	 }
  		if (compass.a.y > compass.a_max.y)
    	 	 {
      	 	  compass.a_max.y = compass.a.y;
    	 	 }
   		if (compass.a.z > compass.a_max.z)
    		 {
    	 	  compass.a_max.z = compass.a.z;
    	 	 }
   		if (compass.a.x < compass.a_min.x)
    	 	 {
     	 	  compass.a_min.x = compass.a.x;
    	 	 }
    
    		if (compass.a.y < compass.a_min.y)
    	 	 {
      		  compass.a_min.y = compass.a.y;
    	 	 }
    
    		if (compass.a.z < compass.a_min.z)
    	 	 {
      		 compass.a_min.z = compass.a.z;
    	 	 }
  ////////
  
  	 	
	 	Serial.print("Maxx: ");
  		Serial.print(compass.m_max.x);
  		Serial.print(" MaxY: ");
  		Serial.print(compass.m_max.y);
 		Serial.print(" MaxZ: ");
  	 	Serial.print(compass.m_max.z);
   
  	 	Serial.print("Minx: ");
 	 	Serial.print(compass.m_min.x);
  	 	Serial.print(" MinY: ");
  	 	Serial.print(compass.m_min.y);
  	 	Serial.print(" MinZ:: ");
 	 	Serial.println(compass.m_min.z);

///////
	 	Serial.print("Maxx: ");
  		Serial.print(compass.a_max.x);
  		Serial.print(" MaxY: ");
  		Serial.print(compass.a_max.y);
 		Serial.print(" MaxZ: ");
  	 	Serial.print(compass.a_max.z);
   
  	 	Serial.print("Minx: ");
 	 	Serial.print(compass.a_min.x);
  	 	Serial.print(" MinY: ");
  	 	Serial.print(compass.a_min.y);
  	 	Serial.print(" MinZ:: ");
 	 	Serial.println(compass.a_min.z);
////////
	 
             }
               while (Serial.available()>0)
			{
		 	respond = Serial.read();
   			}
               
         }

	//D pressed -> end loop
	Serial.println("DONE");
	delay(2000);

	}

so far my terminal window shows nothing... am I doing something wrong?

I'm using the Arduino Uno to connect to LSM303DLH breakout (from sparkfun) and also the logic level converter. I hooked up everything accordingly and I have no error in the code as well but nothing is showing up in my terminal session window.

The terminal window (the IDE Serial Monitor?) also set to 9600?

Put a Serial.print right after this:
Serial.begin(9600);

Do you have 4.7K to 10K pulll up resistors on the SCL & SDA lines?

Could comm's over Wire.h is hung up due to missing resistors, so you are not getting to the first print.

Which pull up resistors would I need for LSM303DLH breakout (from sparkfun)?

is it 4.7K or 10K ?

I made this connection from this website as it is deemed to be correct.

Could it be the coding part? or actual physical connection part?

https://picasaweb.google.com/lh/photo/AIiOfELj07YYfxNzte1jWfUyuJg5fbvJpQtmBljJuuk?feat=directlink

is it 4.7K or 10K ?

Anything between those two values.

^ ok thank you. I will try it and see if that works.

CrossRoads:
The terminal window (the IDE Serial Monitor?) also set to 9600?

Put a Serial.print right after this:
Serial.begin(9600);

Do you have 4.7K to 10K pulll up resistors on the SCL & SDA lines?

Could comm's over Wire.h is hung up due to missing resistors, so you are not getting to the first print.

I tried doing what you told me and nothing is still showing up on my terminal window.