Go to advanced search

by texy
Tue Jun 19, 2012 12:30 pm
Forum: Python
Topic: Web Sever side scripting Python + GPIO
Replies: 39
Views: 69209

Re: Web Sever side scripting Python + GPIO

... + PHP code <html> <head> <?php if (isset($_POST['RedON'])) { exec('sudo python /var/www/gpio/red_on.py'); } if (isset($_POST['RedOFF'])) { exec('sudo ... I know how to control the GPIO lines (see my thread on driving an LCD), but I know nothing of webservers, etc. Thanks, Texy
by kghunt
Tue Jun 19, 2012 9:41 am
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Re: Pi Clock

... to a variable. Doh! Here is my new and improved driver #!/usr/bin/env python import serial import time lcd = serial.Serial("/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0", ...
by kghunt
Mon Jun 18, 2012 9:58 pm
Forum: Graphics, sound and multimedia
Topic: Hi can anyone help connecting a 2x16 LCD
Replies: 9
Views: 6654

Re: Hi can anyone help:S

... It shows my journey in getting it working. The LCD smartie displays work out of the box with a program called lcdproc. But ... should work for your LCD too with minimal modification. I wrote it in python and I have only been writing python since last week. I'm no expert ...
by kghunt
Sun Jun 17, 2012 10:40 pm
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Re: Pi Clock (LCD Working!!!!!!!!!!)

... second sleep after writing the serial made everything work... So no my lcd function is fully functional!!! Whoop Whoop! #!/usr/bin/env python import serial import time lcd = serial.Serial("/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0", ...
by kghunt
Sun Jun 17, 2012 9:24 pm
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Re: Pi Clock

... I can do is turn off the backlight! nothing else works.. #!/usr/bin/env python import serial import time lcd = serial.Serial("/dev/ttyUSB0", 9600, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE, ...
by arkhanist
Sun Jun 17, 2012 10:56 am
Forum: Other projects
Topic: Driving a ST7565 GLCD from the GPIO port?
Replies: 9
Views: 7788

Driving a ST7565 GLCD from the GPIO port?

... arrived pi. Basically, I'm thinking of wiring up a small graphical LCD via GPIO - small enough to fit on top of a modded case for the pi - that ... Do I then use the bootc SPI kernel driver? node-serialport? rpi.gpio python library? Modify the arduino C library for the pi? Some combination ...
by buxtronix
Sat Jun 16, 2012 12:29 am
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Re: Pi Clock

... are sending the hex strings as ascii representations of them, but the LCD expects actual binary values represented by the hex. Change your line ... to input = "\xFE\x47\x01\x01TEST" For more info lookup "python string literals". As for the permissions, you can try "chmod 666 /dev/ttyUSB0" ...
by kghunt
Fri Jun 15, 2012 11:07 pm
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Re: Pi Clock

Now I am basking in frustration. I have a sure Electronics 16*2 USB LCD display and I am trying to control it without using LCD proc /LCD4 linux ... device using hex commands (see below). Someone has actually written a python driver for said display, but try as I might I cannot get anything I ...
by kghunt
Thu Jun 14, 2012 5:41 pm
Forum: Python
Topic: Pi Clock
Replies: 19
Views: 6202

Pi Clock

... not due until the end of the month ( I hope) but I have been doing some python in preparation for it. I am making a proof of concept clocking in machine using a pi a USB keypad and a USB LCD off eBay. I call it the pi clock. I have managed to write (after doing a few ...
by texy
Sun Jun 10, 2012 5:40 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49065

Re: Python driving 44870 LCD

Thanks for the confirmation. I have used these LCD for some years now, mainly with picaxe. I usually only toggle E for 1ms without problems. The biggest hurdle is usually getting the initialisation correct.
I battled with the pi for a week as I had the RS and E wires swapped ;-/

Texy
by sharpapotheosis
Sun Jun 10, 2012 4:59 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49065

Re: Python driving 44870 LCD

... on the data pins and flash the E pin. You can then move on to the next command: there's no need to reset everything. Also, as an aside, can the LCD have the E pin held for less than 10ms? It probably depends on the particular LCD you're using.
by texy
Sun Jun 10, 2012 2:05 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49065

Re: Python driving 44870 LCD

That looks like it would save a lot of time and code! I,d still need to sort out leading '0's though would'nt I?

Texy
by sharpapotheosis
Sun Jun 10, 2012 1:54 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49065

Re: Python driving 44870 LCD

Instead of having the if elif statements, you could use an array to contain the pins, and cycle through it using a for loop: for example: bits = bin(bits)[2:] pin_numbers = [23,22,21,18] for i in range(4): GPIO.output(pin_numbers[i], bool(bit[i]) I don't know if that's helpful, but it's something I ...
by texy
Sun Jun 10, 2012 12:45 pm
Forum: Other projects
Topic: [Q]hd44780 lcd screen
Replies: 53
Views: 48603

Re: [Q]hd44780 lcd screen

by texy
Sun Jun 10, 2012 12:39 pm
Forum: Python
Topic: Python driving 44780 LCD
Replies: 101
Views: 49065

Python driving 44780 LCD

... I have been able to get a LCD module to display messages using python directly from the GPIO The code is not very clever, and also not very fast - I,m sure ...
by texy
Sun Jun 10, 2012 7:14 am
Forum: Python
Topic: Running compiled code
Replies: 3
Views: 3951

Running compiled code

Hi, I have written a python program that writes to a LCD module via the gpio port. The program appears to run quite slowly, noticeably slower than equivalent C ...
by texy
Sun Jun 10, 2012 6:47 am
Forum: Other projects
Topic: [Q]hd44780 lcd screen
Replies: 53
Views: 48603

Re: [Q]hd44780 lcd screen

... that way, but that's not the only way. See above on how to connect an LCD directly to the pi without additional I2C interfaces. If you already ... of the pi. I will be posting a thread shortly on how I did it, and the python code to get it to display a message. Texy
by texy
Sat Jun 09, 2012 10:01 pm
Forum: Python
Topic: Decimal to Binary Library
Replies: 12
Views: 5711

Re: Decimal to Binary Library

Yep, it's my python class abilities that are to fault :P Anyway, I've got something working now. The ... Many thanks for the code in this post - it has helped me write a routine for a LCD driver. Texy
by avtsuk
Sat Jun 09, 2012 9:13 pm
Forum: Other projects
Topic: Inexpensive (Basic Graphics) LCD Display
Replies: 24
Views: 25645

Re: Inexpensive (Basic Graphics) LCD Display

I've been playing with a 16x2 LCD Display - these are the results - http://youtu.be/dxdBxfTwA04

Its all written in PHP, rather than Python as I'm using it as a stepping stone onto another project..
by FinleysDad
Fri Jun 08, 2012 11:16 am
Forum: Other projects
Topic: Timed Buzz Wire Project
Replies: 0
Views: 482

Timed Buzz Wire Project

... i know its not too complicated but hopefully will teach me a bit of python and electronics Features I'm hoping to include are: Timing system ... to skill level no Keyboard or mouse required but buttons and small lcd screen like an old phone type I keep seeing around the forum I'm just ...
by kenmc
Wed Jun 06, 2012 9:47 am
Forum: Automation, sensing and robotics
Topic: Python/PyWeather collaboration??
Replies: 35
Views: 14624

Re: Python/PyWeather collaboration??

joefly wrote:http://code.google.com/p/python-weather-api/

have you tried pywapi..

i am running it fine from my RPi and sending info to Arduino with LCD
Not the same - this just pulls a weather forecast from the web, rather than from a weather station sitting in your garden.
by joefly
Tue Jun 05, 2012 4:36 pm
Forum: Automation, sensing and robotics
Topic: Python/PyWeather collaboration??
Replies: 35
Views: 14624

Re: Python/PyWeather collaboration??

http://code.google.com/p/python-weather-api/

have you tried pywapi..

i am running it fine from my RPi and sending info to Arduino with LCD
by yeahbox
Mon Jun 04, 2012 8:46 am
Forum: General programming discussion
Topic: Very Basic Python Questions
Replies: 10
Views: 8224

Re: Very Basic Python Questions

... It was the RPi was not sufficiently powering my arduino which has an LCD attached so the Arduino was not acting correctly. Good that you are up ... issue, which is what I expected. There is a bigger difference between python 2.x and 3.x than it is between 2.6 and 2.7. There is already plenty ...
by joefly
Mon Jun 04, 2012 4:13 am
Forum: General programming discussion
Topic: Very Basic Python Questions
Replies: 10
Views: 8224

Re: Very Basic Python Questions

Antiloquax. Thanks that was helpful to figuring how to upgrade. I got 2.7.3 going. Unfortunately. I figured out it was not the version problem. It was the RPi was not sufficiently powering my arduino which has an LCD attached so the Arduino was not acting correctly.

Thanks anyway for the help
by nuttingcdef
Sun May 27, 2012 10:27 am
Forum: Beginners
Topic: First experiences - with a few tips and pointers
Replies: 2
Views: 1838

First experiences - with a few tips and pointers

... - redid the download and all well. 3. HDMI output - I'm using a Hitachi LCD TV. Initially the display was quite small on the TV. Gert van Loo's post ... group at our local primary school in a few weeks. 8. Briefly looked at Python which looks good - but not a language I've ever really used before. ...

Go to advanced search