Go to advanced search

by Davies
Mon Apr 10, 2017 2:37 pm
Forum: Python
Topic: use variable contents not variable name
Replies: 4
Views: 357

use variable contents not variable name

im trying to render a form in web.py using a user login name(carried by a variable) and a predefined form name based on the page that is been viewed (ie temperatures from around house for me and separate page with temps around house my missus would be interested in) but im stuck on stitching those 2...
by Davies
Tue Mar 28, 2017 1:48 pm
Forum: Python
Topic: LCD sleep prevent
Replies: 6
Views: 646

Re: LCD sleep prevent

if you want to prevent screen sleep/blanking you could change

Code: Select all

sudo nano /etc/lightdm/lightdm.conf
to include..

Code: Select all

xserver-command=X -s 0 dpms
by Davies
Fri Mar 10, 2017 11:52 am
Forum: General discussion
Topic: start menu preferences console
Replies: 2
Views: 487

start menu preferences console

hi all, im looking at removing the start menu, most likely by setting to auto hide then changing the height to 0 pixels or 1 if 0 isnt allowed. but my concern is when i want to put the start menu back on, how will i access it if i cannot see it? where is the actual settings file for it? can i change...
by Davies
Thu Feb 23, 2017 5:22 pm
Forum: Wanted
Topic: Python codeing for ££
Replies: 6
Views: 1529

Re: Python codeing ££

oh i hadnt seen the other post, thanks for that. looks like your trying to accomplish a lot, you need to break it down into manageable pieces which you can do and learn from. first you need to work out what you will use, you could go a number of ways.. immediately id say a web server but that would ...
by Davies
Thu Feb 23, 2017 4:37 pm
Forum: Wanted
Topic: Python codeing for ££
Replies: 6
Views: 1529

Re: Python codeing ££

do you have any code already? most on here are happy to guide if you do have code your trying with.
do you have an electrical circuit in mind? will it just be opening closing a relay or such? based on time, ball launches, button press?
by Davies
Wed Feb 22, 2017 5:49 pm
Forum: Troubleshooting
Topic: RPi3B not booting - HELP
Replies: 5
Views: 595

Re: RPi3B not booting - HELP

if you was to download raspbian from this websites download section and flash it to your sd cards that would prove the sd cards and raspberry are ok and allow use. i think the file your flashing is corrupt or incomplete, ive had backups fail using win32diskimager. i didnt realise at the time, then m...
by Davies
Wed Feb 22, 2017 10:51 am
Forum: Python
Topic: Serial port use with pyserial
Replies: 3
Views: 1885

Re: Serial port use with pyserial

does python return the response from an AT write command without additional code? im unsure, but i think even when you have a successful write through python you dont see unless you catch the response and print it to console. what happens if you try, import serial dongle = serial.Serial(port="/dev/t...
by Davies
Tue Feb 21, 2017 5:35 pm
Forum: Python
Topic: [HELP] One button two tasks
Replies: 4
Views: 515

Re: [HELP] One button two tasks

or this.. import RPi.GPIO as GPIO import os import time GPIO.setmode(GPIO.BCM) GPIO.setup(24, GPIO.IN, GPIO.PUD_UP) run = 0 # variable to see different states while True: if not GPIO.input(24) and run == 0: # gpio to ground and not currently running os.system("nohup /home/pi/radio.sh &>/dev/null &")...
by Davies
Mon Feb 20, 2017 9:06 am
Forum: Python
Topic: Custom program/update to Pixel question
Replies: 3
Views: 591

Re: Custom program/update to Pixel question

What errors do you get when trying to run the script? Or is it that things just don't run as they did? Are you missing any import dependencies? Python 2.7 previously, 3.5 now? That would cause issues. Jetbrains pycharm is good for pointing out Python issues such as grammar, indentation, line spacing...
by Davies
Fri Feb 17, 2017 12:11 pm
Forum: Troubleshooting
Topic: Unable to sudo config.txt
Replies: 5
Views: 703

Re: Unable to sudo config.txt

it does say here.. https://www.raspberrypi.org/documentation/configuration/config-txt.md "If you need to apply some of the config settings below, but you don't have a config.txt on your boot partition yet, then simply create it as a new text file." so the lack of a config.txt on first boot may not b...
by Davies
Fri Feb 17, 2017 11:54 am
Forum: Troubleshooting
Topic: Unable to sudo config.txt
Replies: 5
Views: 703

Re: Unable to sudo config.txt

whats the full command that your calling?
it should be

Code: Select all

sudo nano /boot/config.txt
by Davies
Fri Feb 17, 2017 11:33 am
Forum: Troubleshooting
Topic: GPIO03 auto boot with I2C/SCL?
Replies: 0
Views: 172

GPIO03 auto boot with I2C/SCL?

hi all, as GPIO03 will auto boot the rpi on connection of neutral, i have also got a 2.5F 5v cap which holds power on isolation for the raspberry to run a safe shutdown, using a diode and GPIO03 pulled up, im able to say when the power is isolated 03 goes high so shutdown.... but now i want to use I...
by Davies
Fri Feb 17, 2017 11:15 am
Forum: Troubleshooting
Topic: sakis3g sim800 reconnect on disconnect
Replies: 3
Views: 960

Re: sakis3g sim800 reconnect on disconnect

that command failed to run, im now using UMTSkeeper to maintain my connection. if you come across this post looking for setup instructions on a sim800 these web pages are which helped me.(5days of googling, reading and trying yielded these..) https://hallard.me/enable-serial-port-on-raspberry-pi/ ht...
by Davies
Thu Feb 16, 2017 5:38 pm
Forum: Troubleshooting
Topic: sakis3g sim800 reconnect on disconnect
Replies: 3
Views: 960

Re: sakis3g sim800 reconnect on disconnect

or maybe the answer lays in python.. i could perhaps call an AT command to check status then use

Code: Select all

import os
os.system("sudo /home/pi/sakis3g connect OTHER="CUSTOM_TTY" APN="CUSTOM_APN" CUSTOM_APN="everywhere" APN_USER="eesecure" APN_PASS="secure"")
to reconnect.. maybe :/
by Davies
Thu Feb 16, 2017 5:22 pm
Forum: Troubleshooting
Topic: Can't log into GUI
Replies: 17
Views: 2914

Re: Can't log into GUI

this is from a late 2015 (i think) raspbian running on an rpi 2b with the original pi login crw-rw-rw- 1 root tty 5, 0 Jan 23 22:37 /dev/tty crw--w---- 1 root tty 4, 0 Jan 23 22:37 /dev/tty0 crw------- 1 pi tty 4, 1 Jan 23 22:38 /dev/tty1 crw--w---- 1 root tty 4, 10 Jan 23 22:37 /dev/tty10 crw--w---...
by Davies
Thu Feb 16, 2017 3:09 pm
Forum: Troubleshooting
Topic: Can't log into GUI
Replies: 17
Views: 2914

Re: Can't log into GUI

ive just had an issue very similar to this whilst putting an autostart script for a sim800 device in my rc.local.. my issue was that id missed out a " speech mark.. but that caused a continuous loop requiring a log in even though ive set my rpi to auto log in. after inserting the password my screen ...
by Davies
Thu Feb 16, 2017 2:59 pm
Forum: Troubleshooting
Topic: rPi3 fresh install, no ssh connection via wired Ethernet
Replies: 7
Views: 1635

Re: rPi3 fresh install, no ssh connection via wired Ethernet

could try on terminal sudo raspi-config then choose "interfacing options", "SSH", "Yes" (which would require a screen) or.. and i know this wouldnt answer what the issue is, but if you have an SD set up that already works you could create an .img of the sd card then flash that to your new card, usin...
by Davies
Thu Feb 16, 2017 2:53 pm
Forum: Troubleshooting
Topic: sakis3g sim800 reconnect on disconnect
Replies: 3
Views: 960

sakis3g sim800 reconnect on disconnect

hi all, following many of guides from 2012+ ive managed to get a sim800 working with the rpi3. ppp0 shows on ifconfig, i have web connectivity and the ability to send emails. i auto start my connection on boot by adding to etc/rc.local before the exit line sudo /home/pi/sakis3g connect OTHER="CUSTOM...
by Davies
Thu Feb 16, 2017 1:38 pm
Forum: Python
Topic: How to stop a running script in tkinter
Replies: 8
Views: 2311

Re: How to stop a running script in tkinter

hi joseplaselva
please add your code using the code button

Code: Select all

if you use code:
    your indentations will be displayed correctly
by Davies
Tue Jan 31, 2017 6:49 pm
Forum: Python
Topic: Check wi-fi status from python script
Replies: 4
Views: 5731

Re: Check wi-fi status from python script

import urllib try: url = "https://www.google.com" urllib.urlopen(url) status = "Connected" except: status = "Not connected" print status if status == "Connected": # do stuff... will check for internet connection. check_output(['hostname', '-I']) shows all IP's so if wifi is the only connection you ...
by Davies
Tue Jan 17, 2017 11:59 am
Forum: Python
Topic: socket.gaierror when trying to check emails
Replies: 2
Views: 423

Re: socket.gaierror when trying to check emails

this should do.. #!/usr/bin/python import poplib from email import parser import time import urllib while 1: try: url = "https://www.google.com" urllib.urlopen(url) status = "Connected" except: status = "Not connected" print status if status == "Connected": pop_conn = poplib.POP3_SSL('pop.gmail.com'...
by Davies
Tue Jan 17, 2017 11:45 am
Forum: Python
Topic: socket.gaierror when trying to check emails
Replies: 2
Views: 423

Re: socket.gaierror when trying to check emails

a little more testing has proven this to be lack of internet connection, i was testing on rpi prior to internet connection then testing again by ssh once wifi had been established. changing rpi to hold boot until network and disconnecting the ethernet to computer resolved this issue, im now searchin...
by Davies
Tue Jan 17, 2017 11:08 am
Forum: Python
Topic: socket.gaierror when trying to check emails
Replies: 2
Views: 423

socket.gaierror when trying to check emails

hi all, i have this code.. which ive used previously without issue but now im just getting errors each time. #!/usr/bin/python import poplib from email import parser pop_conn = poplib.POP3_SSL('pop.gmail.com') pop_conn.user('[email protected].com') pop_conn.pass_('MY_PASSWORD') messages = [pop_conn.ret...
by Davies
Thu Jan 12, 2017 7:08 pm
Forum: Python
Topic: Python to Internet database
Replies: 3
Views: 768

Re: Python to Internet database

they look awesome and i would love something like that but they dont seem to show python related code and id really like something to work with the code i have already. im thinking have a raspberry at home host the web.py webserver then have the raspberry in its remote location sending the informati...
by Davies
Tue Jan 10, 2017 4:46 pm
Forum: Python
Topic: Python to Internet database
Replies: 3
Views: 768

Python to Internet database

hi all, im wanting to access info from a python script hosted on my raspberry through the internet. the internet connection on the raspberry will be by mobile network, so i can not rely on IP addresses to get the information such as web.py as i cannot find a mobile network provider that will issue a...

Go to advanced search