Go to advanced search

by DougieLawson
Mon Feb 18, 2019 6:01 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Which GPIO pins do I mount my DS3231 to?
Replies: 2
Views: 41

Re: Which GPIO pins do I mount my DS3231 to?

Vin connects to pin#1
GND connects to pin#6
SCA connects to pin#3
SCL connects to pin#5

https://pinout.xyz
by DougieLawson
Sun Feb 17, 2019 9:23 pm
Forum: Beginners
Topic: Running python from rc.local / systemd service - files
Replies: 10
Views: 163

Re: Running python from rc.local / systemd service - files

If you run from a systemd service file add

Code: Select all

[Service]
WorkingDirectory=/home/pi
User=pi
Group=pi
by DougieLawson
Sun Feb 17, 2019 8:40 pm
Forum: Troubleshooting
Topic: PostgreSQL updated now what?
Replies: 2
Views: 49

Re: PostgreSQL updated now what?

Kali isn't supported here and there's very few folks running Postgresql.

You are more likely to get a sane answer at https://forums.kali.org
by DougieLawson
Sun Feb 17, 2019 8:36 pm
Forum: Beginners
Topic: Running python from rc.local / systemd service - files
Replies: 10
Views: 163

Re: Running python from rc.local / systemd service - files

You should use os.rmdir() os.remove() or os.unlink(). They're the python way.

In each case pass the fully qualified filename or directory name. Don't rely on the shell environment as it won't be the same as running under idle/thonny or in a command window.
by DougieLawson
Sun Feb 17, 2019 8:30 pm
Forum: Off topic discussion
Topic: Should the Pi Forum switch to Discourse?
Replies: 23
Views: 597

Re: Should the Pi Forum switch to Discourse?

The real issue with phpBB3 is the truly awful database design that doesn't scale well and lousy SQL that can't be improved by throwing indexing at it.
by DougieLawson
Sun Feb 17, 2019 1:16 pm
Forum: Raspbian
Topic: Where is the Raspbian Jesse 8 manifest?
Replies: 1
Views: 48

Re: Where is the Raspbian Jesse 8 manifest?

What are you doing? Why are you continuing to beat Jessie to death (She's been dead since August 2017)? What's stopping you upgrading to Stretch (or using a fresh install of Stretch)?

Note: in Autumn 2019 Stretch will be replace by Buster and Jessie will be two versions out of date.
by DougieLawson
Sun Feb 17, 2019 1:13 pm
Forum: Python
Topic: Introducing a large quantity of Variables
Replies: 10
Views: 159

Re: Introducing a large quantity of Variables

PeterO wrote:
Sun Feb 17, 2019 12:07 pm
:o It's the same answer, just with more detail and a useful link to a tutorial ! :roll:
Because Peter has more desire to do your Googling for you.
by DougieLawson
Sun Feb 17, 2019 11:21 am
Forum: Python
Topic: Introducing a large quantity of Variables
Replies: 10
Views: 159

Re: Introducing a large quantity of Variables

Code: Select all

hours=[0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0]

hours[0] = hours[0]+1
by DougieLawson
Sun Feb 17, 2019 9:59 am
Forum: Advanced users
Topic: Which Rasp for "pro" project?
Replies: 11
Views: 216

Re: Which Rasp for "pro" project?

@ fruitoftheloom I think you're right, this module is perfect for production. The bad point is the motherboard size... You are supposed to design and fabricate your own CM3+ carrier board. The big "motherboard" is intended for development only as it includes all the CM3+ interfaces. When you design...
by DougieLawson
Sat Feb 16, 2019 8:30 pm
Forum: Troubleshooting
Topic: Raspberry Pi won't boot up anymore (Kali)
Replies: 1
Views: 48

Re: Raspberry Pi won't boot up anymore (Kali)

You are much more likely to find someone who can help at: https://forums.kali.org
by DougieLawson
Sat Feb 16, 2019 8:28 pm
Forum: Beginners
Topic: MySQL problem: PHP extension “pdo_mysql” is disabled
Replies: 5
Views: 74

Re: MySQL problem: PHP extension “pdo_mysql” is disabled

Then you'll need to hack at the php config files in /etc/php/7.0
by DougieLawson
Sat Feb 16, 2019 4:27 pm
Forum: Advanced users
Topic: Trigger script on sunset and -rise
Replies: 4
Views: 69

Re: Trigger script on sunset and -rise

Everything in /usr/local/... is locally created.
by DougieLawson
Sat Feb 16, 2019 2:45 pm
Forum: Advanced users
Topic: Trigger script on sunset and -rise
Replies: 4
Views: 69

Re: Trigger script on sunset and -rise

I run sunwait from a crontab twice per day. 45 4 * * * root /usr/local/bin/sunwait civ up +0:00:00 51.200000N 1.130000W ; /usr/local/bin/sunny.sh light; 30 15 * * * root /usr/local/bin/sunwait civ down -0:00:00 51.200000N 1.130000W ; /usr/local/bin/sunny.sh dark; That gets the sunny.sh shell script ...
by DougieLawson
Sat Feb 16, 2019 12:41 pm
Forum: Troubleshooting
Topic: Gpio pins dying on my Rasp 3
Replies: 7
Views: 112

Re: Gpio pins dying on my Rasp 3

If you feed a GPIO with more than 3.3V or 16mA you will burn it out. If you feed it with back EMF from a motor or solenoid it will die.

You should be switching a MOSFET with the GPIO then switching your load with that MOSFET.

Time to buy a new RPi3B+ as your existing one will soon be 100% dead.
by DougieLawson
Sat Feb 16, 2019 12:38 pm
Forum: Troubleshooting
Topic: wacom bamboo ctl-470 has no pressure
Replies: 2
Views: 37

Re: wacom bamboo ctl-470 has no pressure

If you want the kernel headers use rpi-source from https://github.com/notro/rpi-source that will pull the kernel source and headers for your current running kernel.
by DougieLawson
Sat Feb 16, 2019 10:32 am
Forum: Advanced users
Topic: Can not get RPI3B+ to boot from SD after program_gpio_bootmode=1
Replies: 9
Views: 205

Re: Can not get RPI3B+ to boot from SD after program_gpio_bootmode=1

The best guidance I can offer is DON'T DO THIS. It doesn't make enough difference to boot time.
by DougieLawson
Sat Feb 16, 2019 9:21 am
Forum: Beginners
Topic: Install software for souce hat
Replies: 3
Views: 71

Re: Install software for souce hat

You can run apt install from python with

Code: Select all

import os
cmd = 'sudo apt install sense-hat'
os.system(cmd)
by DougieLawson
Sat Feb 16, 2019 9:18 am
Forum: Beginners
Topic: Running Raspberry Pi 1 OS on Raspberry Pi 3
Replies: 3
Views: 104

Re: Running Raspberry Pi 1 OS on Raspberry Pi 3

If the old SDCard contains NOOBS with Raspbian then don't bother trying to upgrade, the process is complex and not worth the pain.
by DougieLawson
Sat Feb 16, 2019 7:50 am
Forum: Compute Module
Topic: How to set up i2c for rtc?
Replies: 2
Views: 54

Re: How to set up i2c for rtc?

njsss wrote:
Fri Feb 15, 2019 11:31 pm

Code: Select all

$ dmesg | grep pcf8523

rtc-pcf8523: probe of 1-0068 failed with error -121
Your RTC hardware is broken or not wired to the I2C sda/scl pins correctly.
https://pinout.xyz/pinout/i2c
by DougieLawson
Fri Feb 15, 2019 9:29 pm
Forum: Advanced users
Topic: Can not get RPI3B+ to boot from SD after program_gpio_bootmode=1
Replies: 9
Views: 205

Re: Can not get RPI3B+ to boot from SD after program_gpio_bootmode=1

GPIO22 disables SD1, GPIO23 disables SD2, GPIO24 disables NAND (irrelevant on a 3B+), GPIO25 disables SPI, and GPIO26 disables USB. Connect GPIO22 to 3V3 (pin#1 or pin#17) to ENable SD boot. Or connect GPIO22 to GND to DISable SD boot. If you've got the OTP settings wrong or you've ever used ancien...
by DougieLawson
Fri Feb 15, 2019 8:51 pm
Forum: General discussion
Topic: max size of SD card
Replies: 3
Views: 172

Re: max size of SD card

Will5455 wrote:
Fri Feb 15, 2019 1:06 pm
What is the maximum size of sd card raspbian use?
Linux has no practical limit. The limit is the size of your budget.

NOOBS is hard to install on any SDCard over 64GB.
Raspbian needs 8GB but ideally 16GB as a minimum.
by DougieLawson
Fri Feb 15, 2019 8:48 pm
Forum: Beginners
Topic: MySQL problem: PHP extension “pdo_mysql” is disabled
Replies: 5
Views: 74

Re: MySQL problem: PHP extension “pdo_mysql” is disabled

Install both with sudo apt-get install php7.0-mysql php7.0-gd. Then restart your web server.
by DougieLawson
Fri Feb 15, 2019 7:33 pm
Forum: Python
Topic: Problem with Piscope (pigpio) and spidev
Replies: 8
Views: 208

Re: Problem with Piscope (pigpio) and spidev

Simplest option is connect each device with it's own CE/CS/SS pin. Use /dev/spidev0.0 for CE0 and /dev/spidev0.1 for CE1. https://pinout.xyz/pinout/spi

Go to advanced search