DOTHAT Not Displaying Text


#1

I’ve installed a DOT HAT on my Pi and while the LEDs and backlights are working perfectly, I can’t get it to display text from Python. Nothing happens when I call lcd.write(“Hello World”) nor do any of the sample programs work.
I’ve tried all the suggestions here and elsewhere, have upgraded the OS to the latest version and even tried a clean re-install. I’m stuck!
Some background information: it’s a brand new Pi 2, running the latest Raspian. Nothing else connected at the moment except a wifi aerial. Power supply is 2.1A which I believe is sufficient. I installed the software using the curl script and also installed WiringPi as suggested elsewhere, and made sure boot/config.txt had the spi line.
Only one other thing I can think of: I have also been running a PiLite on this Raspberry Pi although I obviously don’t run both at the same time.
Before I send it back as a faulty unit (I’m not sure I believe that’s the problem) have I missed anything else out? All help gratefully received!


#2

Which examples are you running, and what library are you importing to write to the LCD? Could you post a snippet of your code.


#3

Sure. I’ve tried all the examples which are supposed to display something and none of them work. Essentially it’s this:
import dot3k.lcd as lcd
lcd.write(“Hello world”)
Nothing happens on the DOT HAT. It’s definitely working otherwise, because I can control the backlight and LEDs.


#4

Can you try:

import dothat.lcd as lcd
lcd.write("Hello World")

If it works, I’ll be in the other room, kicking myself.


#5

Still nothing happens, I’m afraid. Don’t start kicking yourself just yet :-)


#6

Drat. Is this Python 2 or 3? I’ve go to get to the bottom of this- I’m certain there’s something amiss in the software but it’s hard to track down.


#7

$ python --version
Python 2.7.3


#8

Happy to help you track down the problem if you let me know what else to look out for.


#9

Thank you. I’ve had it happen to me once and was certain I’d fixed it.

Let’s try working around the software:

import dothat.lcd as lcd
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT)
GPIO.output(12, GPIO.HIGH)
time.sleep(1)
lcd.write("Hello World")

This will no-doubt spit out some warnings, but hopefully…


#10

Nope still nothing. No warnings either though.


#11

Actually it should probably be:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT)
GPIO.output(12, GPIO.HIGH)

import dothat.lcd as lcd

lcd.write("Hello World")

But also try:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.OUT)
GPIO.output(8, GPIO.HIGH)

import dothat.lcd as lcd

lcd.write("Hello World")

#12

Still no joy. But after the statement “GPIO.setup(8, GPIO.OUT)” I get the following error:
main:1: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.


#13

Note: I think I’m on to something with the latter. I’ve been cross referencing my library code with the schematics and think I’ve overlooked the Chip Select pin. Previously I thought the Reset pin was at fault- but reset has a 10k pullup on it. Chip Select does not! Although looking at the datasheet Chip Select is active low, so that latter code should probably be:

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.OUT)
GPIO.output(8, GPIO.LOW)

import dothat.lcd as lcd

lcd.write("Hello World")

#14

Still quiet, same warning. Here’s the full output:
$ sudo python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.OUT)
main:1: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.

GPIO.output(8, GPIO.LOW)

import dothat.lcd as lcd

lcd.write(“Hello World”)


#15

Drat! I think we’ll have to try a replacement and retrieve yours for some testing in-house. I can’t shake the ominous feeling that I’m in for a colossal facepalm moment in the near future.

Could you drop us an email to support with your order particulars, please?

Thanks very much for bearing with me, I still can’t shake the feeling it’s something to do with the software.

It really doesn’t help that I don’t have a DOTHAT with me tonight to actually tinker with!


#16

Sure, no problem. I’ll sort it out tomorrow. I’m with you - I suspect it’s a software problem too. The HAT seems to be working fine otherwise. Thanks for your help!


#17

Out of curiosity, what does the soldering look like on all the pins that join the screen onto the main HAT board? I’ll upgrade you so you can post a photo if you’ve got the time!


#18

Ok, here’s a photo. It looks ok to me but I’m no expert! I’ll send it off today.


#19

Looks pretty much spot on to me too! If it doesn’t miraculously work when we get it back to test ( which is some sort of law of the universe or something )- it’ll be scope time!


#20

Ok I will send it back to you. What should I include with the parcel? Do I need a returns number or anything or are you not that bureaucratic?