Go Down

Topic: SainSmart LCD Shield question (Read 7 times) previous topic - next topic

GlassCurtain


Quote
That's all I'm using.

No it's not - there's data on the LCD screen.

For each thing you try we need to see the entire sketch and a photograph of the resulting display.


Don


That is all I'm using. I said I wrote to the LCD just as a quick test. Then I rem'd the lines out because my most basic problem is that I'm not getting data to the shield. But here is the entire sketch:

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
//#include <LiquidCrystal.h>

int sensePin = 2;
#include "DHT.h"

//LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// Uncomment whatever type you're using!
#define DHTTYPE DHT11   // DHT 11
//#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin 1 (on the left) of the sensor to +5V
// Connect pin 2 of the sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor

DHT dht(sensePin, DHTTYPE);

void setup() {
 
  Serial.begin(9600);
Serial.println("DHTxx test!");

  dht.begin();
}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

//float temp = t * 9/5 + 32; //Convert *C to *F.

    Serial.print("Humidity: ");
    Serial.print(h); 
    Serial.print(" %\t");
    Serial.print("Temperature: ");
    Serial.print(t);
    Serial.println(" *C");
}

Here are my results plugged up directly to the arduino:



Using the same sketch with the shield on here are the results:



So I think I've read the pinout on the shield wrong or something. I can't figure out what pin will pull data to the shield.

floresta

I haven't seen any documentation that shows which pin is which on the Sainsmart shield.  What makes you think that you have your yellow wire in the correct place.  If I were designing the shield I would have the pins on the shield directly above the corresponding pins on the underlying Arduino.

Don

GlassCurtain


I haven't seen any documentation that shows which pin is which on the Sainsmart shield.  What makes you think that you have your yellow wire in the correct place.  If I were designing the shield I would have the pins on the shield directly above the corresponding pins on the underlying Arduino.

Don


Correct, I'm not sure if I'm on the correct pin or not. I asked if someone could help me to identify the correct pin and posted the pinout in my first post. Here is the complete pinout. I figured pin 5 (on J5) on the shield was the correct pin.



Any help is much appreciated! Thank you,

floresta

#13
Oct 10, 2012, 03:55 am Last Edit: Oct 10, 2012, 03:58 am by floresta Reason: 1
Quote
I asked if someone could help me to identify the correct pin ...

There is a difference between identifying the correct pin on a diagram and then finding it on the corresponding PC board.  I have a feeling that you have not found it and this sad excuse for a schematic/wiring diagram is no help.

Quote
I figured pin 5 (on J5) on the shield was the correct pin.

I agree.  What makes you think that you have your yellow wire in the correct place.

Don


GlassCurtain


There is a difference between identifying the correct pin on a diagram and then finding it on the corresponding PC board.  I have a feeling that you have not found it and this sad excuse for a schematic/wiring diagram is no help.


Ah ok. That was my problem. I was relying on the schematics. I don't know why I didn't just grab the multimeter and check continuity on the pin in the first place. I guess I just had a one-track mind. I'm now on the correct pin. Thank you! And sorry for the hassle! :)

Go Up