Go to advanced search

by kiancrowley
Wed Jan 21, 2015 3:57 pm
Forum: Troubleshooting
Topic: Can't get continuous loop (displaying distance to LCD)
Replies: 4
Views: 840

Re: Can't get continuous loop (displaying distance to LCD)

Okay thanks for the advice, I'll try to change my earlier post.
by kiancrowley
Wed Jan 21, 2015 5:57 am
Forum: Troubleshooting
Topic: Can't get continuous loop (displaying distance to LCD)
Replies: 4
Views: 840

Re: Can't get continuous loop (displaying distance to LCD)

Yes sorry I haven't found a solution. My loop code is a while loop after "while True:" with two while loops to work the distance sensor. The lcd.message was tabbed like this: def message(self, text): """ Send string to LCD. Newline wraps to second line""" for char in text: if char == '\n': self.writ...
by kiancrowley
Wed Jan 21, 2015 2:54 am
Forum: Troubleshooting
Topic: Can't get continuous loop (displaying distance to LCD)
Replies: 4
Views: 840

Can't get continuous loop (displaying distance to LCD)

Using a distance sensor and 16 x 2 LCD screen, I'm trying to have the distance sensor get a distance and display it on the screen every second or so. It outputs twice and then gives me an error having to do with the lcd.message function of my LCD screen. Any thoughts on how to fix? Error: Traceback ...
by kiancrowley
Tue Jan 20, 2015 4:50 pm
Forum: Beginners
Topic: While loop breaks out (LCD and distance sensor)
Replies: 3
Views: 818

Re: While loop breaks out (LCD and distance sensor)

So I put GPIO.cleanup() at the end and it still came up with the above error. Any suggestions?
by kiancrowley
Tue Jan 20, 2015 7:22 am
Forum: Beginners
Topic: While loop breaks out (LCD and distance sensor)
Replies: 3
Views: 818

While loop breaks out (LCD and distance sensor)

Hi all, I've been dabbling around with a distance sensor and getting it to display on a 16x2 LCD display. I have it working twice but it breaks out with an error message having to do with my lcd.message command. I'm rather new to Python so if someone can spot the error that would be great. Here's th...
by kiancrowley
Tue Jan 20, 2015 4:35 am
Forum: Beginners
Topic: Python code to display output of distance sensor
Replies: 4
Views: 3646

Re: Python code to display output of distance sensor

LCD code: #!/usr/bin/python # # based on code from lrvick and LiquidCrystal # lrvic - https://github.com/lrvick/raspi-hd44780 ... hd44780.py # LiquidCrystal - https://github.com/arduino/Arduino/blob ... rystal.cpp # from time import sleep class Adafruit_CharLCD(object): # commands LCD_CLEARDISPLAY =...
by kiancrowley
Tue Jan 20, 2015 4:14 am
Forum: Beginners
Topic: Python code to display output of distance sensor
Replies: 4
Views: 3646

Re: Python code to display output of distance sensor

I embedded the code below.
by kiancrowley
Tue Jan 20, 2015 4:13 am
Forum: Beginners
Topic: Python code to display output of distance sensor
Replies: 4
Views: 3646

Re: Python code to display output of distance sensor

Cool! It works about twice and displays, but I can't get it to loop. It seemed to have a problem clearing so I just took out the lcd.clear() from my script. But then it comes back with this. I'll post the Adafruit_CharLCD.py Traceback (most recent call last): File "displaydistance2.py", line 37, in ...
by kiancrowley
Tue Jan 20, 2015 12:17 am
Forum: Beginners
Topic: Python code to display output of distance sensor
Replies: 4
Views: 3646

Python code to display output of distance sensor

I've been using an HC-SR04 distance sensor and have been able to output the distance value to the Raspberry Pi's serial monitor. I've also been using a 16 x 2 LCD screen, and have been able to write text using the Adafruit library. However, as I'm new to the Python language, I have been having troub...
by kiancrowley
Sat Jan 17, 2015 9:05 am
Forum: Troubleshooting
Topic: GPIO pins do not work
Replies: 9
Views: 1317

Re: GPIO pins do not work

P_Monty: You are correct! I can't believe I could have overlooked that, I've been using breadboards for about a month now. I feel silly.
Thank you so much!
by kiancrowley
Sat Jan 17, 2015 8:13 am
Forum: Troubleshooting
Topic: GPIO pins do not work
Replies: 9
Views: 1317

Re: GPIO pins do not work

IMG_0958-2.JPG I have the LED the right way and I believe the ribbon cable is the right way as well. The gray cable is towards the SD and it only goes in one way in the cobbler. I also tried the 3.3V and nothing happened. I've attached a couple pictures. Note: Before finding the right configuration...
by kiancrowley
Fri Jan 16, 2015 11:48 pm
Forum: Troubleshooting
Topic: GPIO pins do not work
Replies: 9
Views: 1317

GPIO pins do not work

Hi everybody, I'm rather new to my Raspberry Pi and I've been trying to set up the GPIO pins to light up a simple LED. Using a Pi Cobbler Breakout Kit, I've attached it to a breadboard and wired up one LED with a 220 ohm resistor. However, every attempt to light the LED has been a failure. For some ...

Go to advanced search