Go to advanced search

by DougieLawson
Mon Aug 20, 2018 9:27 pm
Forum: Beginners
Topic: how do i add date/time to log file
Replies: 11
Views: 208

Re: how do i add date/time to log file

Simple observation where's the leading slash. It should be

Code: Select all

filename = "/home/pi/chatlogtst1.log"
by DougieLawson
Mon Aug 20, 2018 7:51 pm
Forum: Raspbian
Topic: Power supply failed? now in emergency mode - headless
Replies: 8
Views: 125

Re: Power supply failed? now in emergency mode - headless

Since you have a Raspberry that's capable of running Linux (power supply permitting) then grab a new SDCard. Build a copy of plain Raspbian 2018-06-27 on it. Boot that. Mount the broken SDCard in a USB reader. Use the new Raspbian system to repair the borken one.
by DougieLawson
Mon Aug 20, 2018 6:23 pm
Forum: Beginners
Topic: measure height elevation
Replies: 5
Views: 101

Re: measure height elevation

What sensor are you planning to use? GPS? Barometric?
Do you have datum elevation near to you like an airfield, airport or a hill with a trig point?
by DougieLawson
Mon Aug 20, 2018 6:04 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 71
Views: 656

Re: Multiple DS18B20 Sensors on 20x4 LCD

I never got a degree to work so I defined my own at custom char 0. Exactly what I did using RPLCD, just one of the many functions this driver for this type of LCD offers, but not sure how to do it using the LCD driver T-EGWZ34 is using. I really think we should encourage the OP to switch to the RPL...
by DougieLawson
Mon Aug 20, 2018 5:38 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 71
Views: 656

Re: Multiple DS18B20 Sensors on 20x4 LCD

I never got a degree to work so I defined my own at custom char 0.
by DougieLawson
Mon Aug 20, 2018 1:27 pm
Forum: Beginners
Topic: Calling a sh from PHP Apache to run DC motor
Replies: 1
Views: 26

Re: Calling a sh from PHP Apache to run DC motor

sudo usermod -G -a dialout www-data

Your webserver can't access the serial port to talk to your Arduino without that.
by DougieLawson
Mon Aug 20, 2018 1:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: ttyAMA0 Serial on Rasbian Jessie @RPi B+
Replies: 3
Views: 28

Re: ttyAMA0 Serial on Rasbian Jessie @RPi B+

[email protected]_rp: cd /etc/udev/rules.d/ [email protected]_rp: /etc/udev/rules.d $ ls 99-com.rules 99-silabs.rules [email protected]_rp: /etc/udev/rules.d $ nano 99-com.rules internchange AMA0 [01] and ttyS0 Bit late to the party. This topic has been dead for about 1.5 years BTW: if you modify that file then you run the risk...
by DougieLawson
Mon Aug 20, 2018 12:14 pm
Forum: Networking and servers
Topic: Media cluster
Replies: 4
Views: 75

Re: Media cluster

Your project, you work it out.
by DougieLawson
Mon Aug 20, 2018 11:46 am
Forum: Troubleshooting
Topic: reinstall raspbian
Replies: 3
Views: 77

Re: reinstall raspbian

If you used the NoobS installer / chooser it has an option to re-install, rtm: https://github.com/raspberrypi/noobs/blob/master/README.md BEWARE: that option splats everything, no backup, so saving of your programs or data that might already be on the card. It simply wipes out the Raspbian partitio...
by DougieLawson
Mon Aug 20, 2018 9:25 am
Forum: Beginners
Topic: can't boot PI3 after dropping the heat sink onto the board by accident
Replies: 16
Views: 270

Re: can't boot PI3 after dropping the heat sink onto the board by accident

You can. Although my Electronics 101 is a low voltage course. High power @ 400Kv is a topic for another day.
by DougieLawson
Mon Aug 20, 2018 8:13 am
Forum: Troubleshooting
Topic: Raspberry pi 3 not rebooting from usb
Replies: 11
Views: 177

Re: Raspberry pi 3 not rebooting from usb

B.Goode wrote:
Mon Aug 20, 2018 8:05 am
Although it isn't explicit in https://www.raspberrypi.org/documentati ... ootflow.md, perhaps this is expected behaviour?
No, it's a bug in kernel/bootcode. I thought it had been resolved with a recent update, perhaps not.
by DougieLawson
Mon Aug 20, 2018 8:09 am
Forum: Python
Topic: QR scanner output using HID
Replies: 3
Views: 43

Re: QR scanner output using HID

You're getting HID data as documented on page 53 of http://www.usb.org/developers/hidpage/Hut1_12v2.pdf

The first byte is a bit string (the 0x2 bit means shift). The third byte is "usage ID" (as in the PDF).
by DougieLawson
Mon Aug 20, 2018 7:57 am
Forum: Troubleshooting
Topic: Raspberry pi 3 not rebooting from usb
Replies: 11
Views: 177

Re: Raspberry pi 3 not rebooting from usb

What kernel version do you have? What bootcode version?

uname -a
vcgencmd version


will tell us.
by DougieLawson
Mon Aug 20, 2018 7:28 am
Forum: Troubleshooting
Topic: Raspberry pi 3 not rebooting from usb
Replies: 11
Views: 177

Re: Raspberry pi 3 not rebooting from usb

Run sudo apt update && sudo apt -y dist-upgrade

That will get you new bootcode and a new kernel that will fix your problem.
by DougieLawson
Mon Aug 20, 2018 6:46 am
Forum: Beginners
Topic: can't boot PI3 after dropping the heat sink onto the board by accident
Replies: 16
Views: 270

Re: can't boot PI3 after dropping the heat sink onto the board by accident

There's no slack to cut. Day 1, electronics 101 has three things to learn.
  1. Polarity
  2. Ohms Law
  3. Power off before changing things
that's it. That's the syllabus for the first day of the course.
by DougieLawson
Sun Aug 19, 2018 10:54 pm
Forum: Beginners
Topic: can't boot PI3 after dropping the heat sink onto the board by accident
Replies: 16
Views: 270

Re: can't boot PI3 after dropping the heat sink onto the board by accident

Why would anyone try to mount a heatsink with the board powered up? There's too much chance to short 3V3 to GND, short 5V to 3V3 or short 5V to GND. Shorting pins is a good way to shoot a Raspberry Pi very (and unreviveably) dead.
by DougieLawson
Sun Aug 19, 2018 9:48 pm
Forum: Français
Topic: Je n'arrive pas à extraire un fichier rar
Replies: 18
Views: 246

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

Le code d'erreur 0x80070018 (-2147024872) signifie que votre fichier RAR est endommagé.
by DougieLawson
Sun Aug 19, 2018 9:16 pm
Forum: Français
Topic: Je n'arrive pas à extraire un fichier rar
Replies: 18
Views: 246

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

Taper ça: 7z e -o/home/pi/Downloads test.rar sans espace.
by DougieLawson
Sun Aug 19, 2018 1:56 pm
Forum: Python
Topic: Multiple DS18B20 Sensors on 20x4 LCD
Replies: 71
Views: 656

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: 235

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: 102

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: 71
Views: 656

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: 71
Views: 656

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)

Go to advanced search