Go to advanced search

by DougieLawson
Sun Aug 19, 2018 1:56 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 34
Views: 349

Re: Multiple DS18B20 Sensors on 20x4 LCD

So you can use that to avoid hard-coding sensor names in your programs. Which is a "Good thing®" as it means you don't have to muck about when you add a new sensor or replace a broken one.
by DougieLawson
Sun Aug 19, 2018 1:43 pm
Forum: Troubleshooting
Topic: Ip resolves to local host
Replies: 11
Views: 229

Re: Ip resolves to local host

I've a feeling https://codex.wordpress.org/Changing_The_Site_URL is the answer the OP is trying to find.
by DougieLawson
Sun Aug 19, 2018 1:35 pm
Forum: Advanced users
Topic: My SQL on pi 3 b+?
Replies: 6
Views: 79

Re: My SQL on pi 3 b+?

MySQL got replaced with MariaDB which is equivalent but not owned by Oracle. sudo apt install mariadb-server-10.1 mariadb-client-10.1 python{,3}-mysql.connector should get it installed. MSSQL can be accessed using unixodbc, although the server still runs on a Microsoft machine. Don't know squat abou...
by DougieLawson
Sun Aug 19, 2018 1:29 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 34
Views: 349

Re: Multiple DS18B20 Sensors on 20x4 LCD

Just try my small snippet of code - see what it gives you.
by DougieLawson
Sun Aug 19, 2018 1:08 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 34
Views: 349

Re: Multiple DS18B20 Sensors on 20x4 LCD

Rather than using an array of sensorids why not use glob to find them.

Code: Select all

#!/usr/bin/python3
import glob

sysDir = '/sys/bus/w1/devices/'
w1Devices = glob.glob(sysDir + '28*')
for w1Dev in w1Devices:
  w1Slave = w1Dev + '/w1_slave'
  print (w1Slave)
by DougieLawson
Sun Aug 19, 2018 10:05 am
Forum: Beginners
Topic: No video out of jack socket. Pi3 B+
Replies: 25
Views: 316

Re: No video out of jack socket. Pi3 B+

Mikexx wrote:
Sun Aug 19, 2018 9:45 am
What is the point of Noobs?
There is no point to NOOBS if you aren't using it as a multi-boot manager (and for that you should switch to PINN). I've not yet worked out why the RPF folks haven't moved NOOBS into the annals of history, it does nothing useful (now).
by DougieLawson
Sun Aug 19, 2018 10:03 am
Forum: Raspbian
Topic: Should we be using apt full-upgrade
Replies: 5
Views: 102

Re: Should we be using apt full-upgrade

ShiftPlusOne wrote:
Sun Aug 19, 2018 9:42 am
I'm not in front of a computer, so can't check. I think it's the same as dist-upgrade, but for 'apt'. Since dist-upgrade was a misnomer which resulted in a lot of confusion.
I am in front of a computer and I have checked. Docs say full-upgrade is an alias for dist-upgrade.
by DougieLawson
Sun Aug 19, 2018 9:41 am
Forum: Raspbian
Topic: Should we be using apt full-upgrade
Replies: 5
Views: 102

Re: Should we be using apt full-upgrade

full-upgrade is equivalent to dist-upgrade (runs exactly the same function).

The important thing is NEVER run rpi-update. You don't know what you're getting with rpi-update as it can give you an experimental kernel and untested bootcode.
by DougieLawson
Sun Aug 19, 2018 9:39 am
Forum: Troubleshooting
Topic: Raspberry PI loads in emergency mode - always
Replies: 10
Views: 173

Re: Raspberry PI loads in emergency mode - always

this was suggested by the seller ( where I also bought my PI ). At first i thought i'll run it only with SD card. Bought external disk later. ... but it is true that on picture 2 is visible that this power supply dont have these edges anymore, so it falls out of the PI easily (but it seems it worke...
by DougieLawson
Sun Aug 19, 2018 9:17 am
Forum: General discussion
Topic: How can I make a sound repeat?
Replies: 8
Views: 5488

Re: How can I make a sound repeat?

Change it to

while true ; do aplay file.wav ; done

https://www.cyberciti.biz/faq/bash-infinite-loop/
by DougieLawson
Sun Aug 19, 2018 8:40 am
Forum: Automation, sensing and robotics
Topic: A DIY smart doorbell for $40 with RPi 2/3
Replies: 3
Views: 14537

Re: A DIY smart doorbell for $40 with RPi 2/3

Your question is really "Does Prota OS on the RPi support the camera module?".
https://prota.info/prota/pi/

https://naranhelp.zendesk.com/hc/en-us/ ... ra-support
by DougieLawson
Sun Aug 19, 2018 8:16 am
Forum: Troubleshooting
Topic: Raspberry PI loads in emergency mode - always
Replies: 10
Views: 173

Re: Raspberry PI loads in emergency mode - always

Do you have a good enough power supply? Not a phone charger.
by DougieLawson
Sun Aug 19, 2018 12:14 am
Forum: Add-ons
Topic: ETA for Official POE Hat for 3B+
Replies: 52
Views: 1149

Re: ETA for Official POE Hat for 3B+

Have you run sudo apt update && sudo apt -y dist-upgrade to ensure you have the latest stable kernel and bootcode (which is required for the POE HAT)?
by DougieLawson
Sun Aug 19, 2018 12:02 am
Forum: Python
Topic: noobie needs help getting data from XML webpage
Replies: 4
Views: 76

Re: noobie needs help getting data from XML webpage

I hacked this python3 program together to parse some of the XML from the Aviation Weather Service (I've downloaded a sample XML file from EGLL (London Heathrow)). #!/usr/bin/python3 from bs4 import BeautifulSoup infile = open('egll.xml', 'r') # CHANGE ME to fetch the current URL contents = infile.re...
by DougieLawson
Sat Aug 18, 2018 9:59 pm
Forum: Troubleshooting
Topic: isc-dhcp-server doesn't start unless ethernet connected
Replies: 8
Views: 103

Re: isc-dhcp-server doesn't start unless ethernet connected

If you're not prepared to run a supported version of Raspbian then I'm out.
by DougieLawson
Sat Aug 18, 2018 9:55 pm
Forum: Troubleshooting
Topic: isc-dhcp-server doesn't start unless ethernet connected
Replies: 8
Views: 103

Re: isc-dhcp-server doesn't start unless ethernet connected

Start by upgrading to Raspbian Stretch.
by DougieLawson
Sat Aug 18, 2018 5:48 pm
Forum: Troubleshooting
Topic: Ip resolves to local host
Replies: 11
Views: 229

Re: Ip resolves to local host

https://en.wikipedia.org/wiki/Private_network
https://en.wikipedia.org/wiki/Link-local_address

Your public address won't be in those address ranges. If your Wordpress site doesn't use a public internet address it won't work when a remote visitor tries to access it.
by DougieLawson
Sat Aug 18, 2018 3:14 pm
Forum: Troubleshooting
Topic: Ip resolves to local host
Replies: 11
Views: 229

Re: Ip resolves to local host

You can't use 10.xxx.xxx.xxx/8 or 172.[16-31].xxx.xxx/16, 192.168.xxx.xxx/24 or 169.254.xxx.xxx/16 addresses on the WAN side of your network. Those four blocks are local only and not routed.
by DougieLawson
Sat Aug 18, 2018 12:17 pm
Forum: Français
Topic: Je n'arrive pas à extraire un fichier rar
Replies: 12
Views: 156

Re: Je n'arrive pas à extraire un fichier rar

Où se trouve le fichier?

Vous devriez voir quelque chose comme

Code: Select all

[email protected]:~$ file test.rar
test.rar: RAR archive data, v4, os: Win32
[email protected]:~$
by DougieLawson
Sat Aug 18, 2018 11:42 am
Forum: Français
Topic: Je n'arrive pas à extraire un fichier rar
Replies: 12
Views: 156

Re: Je n'arrive pas à extraire un fichier rar

Qu'est-ce que vous obtenez d'une commande file test.rar?
by DougieLawson
Sat Aug 18, 2018 10:59 am
Forum: Français
Topic: Je n'arrive pas à extraire un fichier rar
Replies: 12
Views: 156

Re: Je n'arrive pas à extraire un fichier rar

sudo apt install p7zip

7z fonctionne avec tout format de fichier: gz, bz2, rar, zip, etc.
by DougieLawson
Sat Aug 18, 2018 10:36 am
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 12
Views: 1026

Re: Python, Java or both?

Warning. Language war alert! I'm sure the "collective" will have as many different views on this as there are members. Or at least as many as there are programming languages. You weren't wrong. The language wars have started. I'd say COBOL but the support on a Raspberry is a bit patchy (although yo...
by DougieLawson
Sat Aug 18, 2018 10:19 am
Forum: Beginners
Topic: Autostart Python script
Replies: 4
Views: 94

Re: Autostart Python script

Add a line item to /home/pi/.config/lxsession/LXDE-pi/autostart

Code: Select all

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@/usr/bin/python3 /home/pi/whatever_script_goes_here.py
by DougieLawson
Sat Aug 18, 2018 10:13 am
Forum: Troubleshooting
Topic: Raspberry Pi 3B+ keeps crashing
Replies: 8
Views: 203

Re: Raspberry Pi 3B+ keeps crashing

Log the output from a free command every minute. You may have a storage leak.

sudo crontab -e

Code: Select all

* * * * * /usr/bin/free >> /var/log/free.log

Go to advanced search