Go to advanced search

by leejohnson
Mon Jun 05, 2017 12:05 pm
Forum: Python
Topic: Python code error but cant find it
Replies: 5
Views: 1046

Python code error but cant find it

Hey guys Ive coded some web extraction tool for my website bassically gets game board information and ends up in excel. I have however got an error but cant seem to work it out could someone kindly cast their eyes over as mine are dead lol # coding: utf-8 """ from __future__ import unicode_literals ...
by leejohnson
Fri Feb 20, 2015 3:50 pm
Forum: Troubleshooting
Topic: help hdmi intermittment on and off
Replies: 1
Views: 410

help hdmi intermittment on and off

hello fellow pi people i have had my raspberry pi B for 6 months and no problems with the hardware side, but a few days ago the pi starts up fine (lights flash) but i get no signal from HDMI output. Sometimes i get a picture for 5 seconds then goes off again. i can see everything like the pi logo an...
by leejohnson
Sat Jan 17, 2015 8:14 am
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

just an update, i took and worked on that last piece and classed a button, then overlaid the screen with my images and it works :) so happy thank you for yourhelp. next challenge i need to over come is when button 1 is pressed show number 1 in a box, like a pin code. so will have 4 numbers in totals...
by leejohnson
Wed Jan 14, 2015 8:25 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

gordon yes i only want screen32 to be called when "users button" is pressed, but only seems to be a icon with no function.

btw thank to gordon and paddy for being patient with me
by leejohnson
Wed Jan 14, 2015 8:22 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

hey i found this code on the net basic button function, button 2 and 3 only print. but i managed to get screen 3 up for a split second how do i get it to change to screen3() and stay there code is the same but using basic buttons but ideally want to use images instead #! /usr/bin/env python import p...
by leejohnson
Wed Jan 14, 2015 7:08 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

Hey guys i was massively ill over xmas so didnt get much done, and reading and trying to learn code while drinking cough med aint good for you. this is my latest code but still not clicking over to 32, which screen 3 is mainscreen and screen 32 is a users screen. any chance of some help guys please....
by leejohnson
Thu Dec 18, 2014 8:56 am
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

cool, ill have to crack (i wana get this sorted before xmas) then i can spend a few days in front of computer. How would you add that to multi screen like my screen 3 and screen 32? or are you saying create a main screen and then lay over the mainscreen? i have uploaded i recent verison of my code t...
by leejohnson
Mon Dec 15, 2014 2:32 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

yes excalty what im after list of buttons in each screen, similar to how the icon and screen blit for each icon is. how would you write it out, code below is main screen two icons and two icon positions def Screen3(): # Main Screen screen.fill(white) override = pygame.image.load("icons/override.png"...
by leejohnson
Mon Dec 15, 2014 11:01 am
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

yes there is, i have cut out alot of the code as i thought it might be easier for you guys to link just 2 screens on 1 or two buttons rather than the rest. it is quite a big piece.

so is my understanding of a button inncorect then? or would people prefer me to post my working code to date?
by leejohnson
Mon Dec 15, 2014 7:20 am
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

Hey guys just to make sure i understand there are three sections to a button. 1. You define what a button is using the same script ive seen on a couple using x and y pos. this goes in the top part where you describe what things are? 2. In each def screen() the button is layout and told where the act...
by leejohnson
Sun Dec 14, 2014 1:44 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

Re: problem with buttons :(

before i added the button function to the script both screens worked and layout well in the 320 x 240 on a white back ground with my icons on there just had to change the screen mode == to what ever one. but when i add the button function i get loads of syntax errors, even Dirks version did not work...
by leejohnson
Sat Dec 13, 2014 9:51 pm
Forum: Python
Topic: problem with buttons :(
Replies: 21
Views: 3099

problem with buttons :(

hey guys i have had a go at trying to create a simple gui. two buttons on one screen, one triggers a relay called( pin 7) and the other button is surpose to select the next screenmode. Where am i going wrong lol :(, thanks for any interest into my headache lol :D #! /usr/bin/env python import pygame...
by leejohnson
Fri Dec 12, 2014 10:03 am
Forum: Python
Topic: gui button to next screen
Replies: 1
Views: 596

Re: gui button to next screen

sorry forgot to put script. i do have some script, i want the users button to go to the users page, settings to settings page and over ride ideally to trigger a GPIO relay please help me overcome my challedge #! /usr/bin/env python import pygame, sys from pygame.locals import * pygame.init() screen3...
by leejohnson
Thu Dec 11, 2014 10:31 am
Forum: Python
Topic: gui button to next screen
Replies: 1
Views: 596

gui button to next screen

hello i have tried getting my head round to make a simple touchscreen button using an picture (next) but going round in circle, tried using the lapse tourch as david uses pygame. i am using python and pygame what i want is 2 icon pictures are on mainscreen 1. icon 1 when pressed (go to mainscreen 0)...
by leejohnson
Thu Dec 04, 2014 2:32 pm
Forum: Python
Topic: help on a couple of pythons question please :)
Replies: 8
Views: 1823

Re: help on a couple of pythons question please :)

wow i like that, thank you very much guys on your help with the slidder. btw is there an easy way of making a button function. for example screenmode 1 has 2 buttons say ( yes) (no) if (yes) pressed go to screenmode 2 if (no) pressed go to screenmode 3 thats what i want to achieve but havent dived i...
by leejohnson
Thu Dec 04, 2014 11:11 am
Forum: Python
Topic: help on a couple of pythons question please :)
Replies: 8
Views: 1823

Re: help on a couple of pythons question please :)

scotty sorry i thought i had put it in.

it is in pygame
by leejohnson
Wed Dec 03, 2014 2:21 pm
Forum: Python
Topic: help on a couple of pythons question please :)
Replies: 8
Views: 1823

help on a couple of pythons question please :)

Hey only me again i have two questions for my gui im working on. 1. i have created a settings page and want to have a slidder bar on the page to control the dimmer on the screen (like a phone or sat nav does) at to save the light setting for all screens. 2. im in need of a countdown when a button is...
by leejohnson
Wed Nov 26, 2014 1:54 pm
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

thank you guys for your help on this, last night i used the lapse code to create a screen mode and works :) however i havent created the button functions yet but your code example i can can make alot more sense then the lapse script. so hopefully try a similar approach to this thank you for your hel...
by leejohnson
Tue Nov 25, 2014 11:14 am
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

tried striping the code and running again no luck :( dirk if you have time you have more knowledge than me are you able to pin up the code you have succussfully done to achieve a screen gui on the computer then i can see where im going wrong. all i need is a button function under the image to click ...
by leejohnson
Mon Nov 24, 2014 1:19 pm
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

i will try and take out the os.4 and run again tonight. yes i included the line 295 aswell first to copy what has been done before. as for the mouse button doewn coooment, that part is in the main loop line 425, but does say #process touchscreen input, will thing still work doesnt look anything spec...
by leejohnson
Mon Nov 24, 2014 12:46 pm
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

i havent got a tft screen, i have the usb touchscreen. but still thought i would be able to view it as a working program in the lx terminal and another window pops up. like my code does isnt a button function all the same ? in thats guys code its between line 60 and 111 but still cant get it to work...
by leejohnson
Mon Nov 24, 2014 11:14 am
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

that is the code that i have been trying to figure out but i can not understand it fully. i can see on that he has icons and buttons outside the mainloop but its setting up the main under screen im confused about. i have tried to run his script but doesnt work as i havent got the motors, so tried cu...
by leejohnson
Mon Nov 24, 2014 10:04 am
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

Re: python with gui buttons

yes this is what im after but havent got a clue how to write it out in code. please could someone help me achieve this goal, main underlay screen then screen1 = 4 images, blit location and 4 buttons screen 2 = 2 images, blit location and 1 button screen3 = etc etc. im not to sure where to put this d...
by leejohnson
Mon Nov 24, 2014 8:22 am
Forum: Python
Topic: python with gui buttons
Replies: 15
Views: 4888

python with gui buttons

hey guys, i am trying my hardest to make a gui using python and pygame. So far i can only get one screen up and viewable called screen3 in my sript, but when i put screen2 below the code of screen3 it overwrites the first screen. what im after is press a png image (what to be a clickable button) the...
by leejohnson
Sun Nov 09, 2014 8:27 pm
Forum: General discussion
Topic: gpio input
Replies: 5
Views: 946

Re: gpio input

no its not to power the pi.

the 12v will go through a convertor down to 5v or 3.3v or less in order to be used as a trigger

will this work?

Go to advanced search