Go to advanced search

by DougieLawson
Mon Feb 19, 2018 10:23 pm
Forum: Advanced users
Topic: Help Making a Clock
Replies: 2
Views: 100

Re: Help Making a Clock

Here's a python program that calculates sunrise/sunset import ephem from numpy import pi from datetime import date, time, datetime def time_string(et): et = et.tuple() d = date(et[0], et[1], et[2]) t = time(et[3], et[4], int(et[5])) dt = datetime.combine(d, t) return dt.strftime("%d %b %Y %H:%M:%S U...
by DougieLawson
Mon Feb 19, 2018 10:16 pm
Forum: Advanced users
Topic: What's the best way for setting up a server?
Replies: 2
Views: 74

Re: What's the best way for setting up a server?

Wemos D1 can do MQTT subscriptions and publishing with https://pubsubclient.knolleary.net
by DougieLawson
Mon Feb 19, 2018 9:45 pm
Forum: Off topic discussion
Topic: RPi4
Replies: 15
Views: 309

Re: RPi4

You do realise that anyone who knows about any future product would be gagged with a non-disclosure agreement. Therefore, as always, these "wish list" pink ponies and unicorn threads are entirely pointless and will never get details about "RPi Next", RPi4, RPi5, RPi73 or RPi99999999.
by DougieLawson
Sun Feb 18, 2018 12:12 pm
Forum: Beginners
Topic: What sould I do with Python version
Replies: 4
Views: 106

Re: What sould I do with Python version

All new code should be written in python3. As a new user forget python 2 ever existed.
by DougieLawson
Sat Feb 17, 2018 11:53 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 34
Views: 67520

Re: /etc/inittab no longer present in Raspbian Jessie?

sudo raspi-config in an LXTerminal window runs a configuration program.
by DougieLawson
Sat Feb 17, 2018 10:35 pm
Forum: General discussion
Topic: Home Automation
Replies: 3
Views: 157

Re: Home Automation

Best starting point for MQTT is: http://hivemq.com/mqtt-essentials/

Easy way to get a broker installed is sudo apt install mosquitto mosquitto-client*

I've just built a system that will control 64 switches from a RPi, it's available as a bespoke commercial system if you'd like to buy a copy.
by DougieLawson
Sat Feb 17, 2018 10:28 pm
Forum: General discussion
Topic: Pi Access with Tablet/Smart Phone
Replies: 9
Views: 384

Re: Pi Access with Tablet/Smart Phone

I use JuiceSSH https://juicessh.com which I thought was so good I paid for the upgraded version.

The only practical way to make a connection using your existing WiFi network or to run your RPi as an access point.
by DougieLawson
Sat Feb 17, 2018 10:25 pm
Forum: Networking and servers
Topic: How to use NTP to sync two pi's clocks (don't care about accuracy)?
Replies: 11
Views: 345

Re: How to use NTP to sync two pi's clocks (don't care about accuracy)?

Run one ntpd as a master, run any other ntpd systems as a slave to that. Master /etc/ntp.conf driftfile /var/lib/ntp/ntp.drift statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstat...
by DougieLawson
Fri Feb 16, 2018 3:32 am
Forum: General discussion
Topic: Convert Short to a 2's complement char help needed in C
Replies: 30
Views: 820

Re: Convert Short to a 2's complement char help needed in C

Easiest conversion in C to char from other formats is sprintf () with a suitable formatting mask.
by DougieLawson
Fri Feb 16, 2018 1:11 am
Forum: Beginners
Topic: Replacing Arduino nanos with Raspi
Replies: 3
Views: 167

Re: Replacing Arduino nanos with Raspi

There's no analog inputs on a Pi. If you need analog the best way is to use an Arduino connected to your Pi.
by DougieLawson
Thu Feb 15, 2018 8:11 pm
Forum: General discussion
Topic: RPi 3 combined with Arduino...
Replies: 8
Views: 337

Re: RPi 3 combined with Arduino...

You connect it with a USB-A to USB-B printer cable for a regular Uno. You connect it with a USB-A to microUSB for a Nano.

It will appear as /dev/ttyACM0 or /dev/ttyUSB0 depending on the serial interface controller on the Arduino.
by DougieLawson
Thu Feb 15, 2018 11:24 am
Forum: Troubleshooting
Topic: Raspbian Stretch is not using Predictable Network Interface Names. Why?
Replies: 5
Views: 152

Re: Raspbian Stretch is not using Predictable Network Interface Names. Why?

It changed to a raspi-config option with the 2017-11-29 build. Too many folks moaned about predictable names.
by DougieLawson
Thu Feb 15, 2018 8:04 am
Forum: General discussion
Topic: RPi 3 combined with Arduino...
Replies: 8
Views: 337

Re: RPi 3 combined with Arduino...

Why not get your mate to run a demo for you.

Arduinos, esp8266 and wemoses are brilliant for simple IoT tasks. The raspberry is ideal as a command & control server for that stuff. It isn't adding extra power to the pi it's offloading tedious workload to the microcontroller.
by DougieLawson
Thu Feb 15, 2018 8:00 am
Forum: Troubleshooting
Topic: Epson Scanner...
Replies: 7
Views: 171

Re: Epson Scanner...

Take a look whether it is supported by SANE. My 2005 Canon scanner that wouldn't work with wonders got a new lease of life with SANE.
by DougieLawson
Thu Feb 15, 2018 7:54 am
Forum: Troubleshooting
Topic: Path= ignored if destop file is in autostart
Replies: 4
Views: 119

Re: Path= ignored if destop file is in autostart

Path= will ALWAYS be ignored, the environment variable is PATH=
by DougieLawson
Thu Feb 15, 2018 7:44 am
Forum: Beginners
Topic: USB flash drives & ownership
Replies: 3
Views: 133

Re: USB flash drives & ownership

Option 2 matches the incantations you'd put in /etc/fstab so is generally more sane.
by DougieLawson
Thu Feb 15, 2018 6:00 am
Forum: Raspbian
Topic: Add additional DNS servers
Replies: 3
Views: 142

Re: Add additional DNS servers

Have you thought about the more mundane option of changing the settings in your router?
by DougieLawson
Wed Feb 14, 2018 11:23 pm
Forum: Troubleshooting
Topic: After reboot pi3 is loosing weather location and digital clock format
Replies: 2
Views: 92

Re: After reboot pi3 is loosing weather location and digital clock format

Is your network connected?

What do you get from
ip addr show
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping -c3 google.com
by DougieLawson
Wed Feb 14, 2018 9:35 pm
Forum: Off topic discussion
Topic: Secure reformat of memory cards
Replies: 6
Views: 220

Re: Secure reformat of memory cards

The only way to achieve total data elimination is by physical destruction which means incineration in the case of any flash memory device.
by DougieLawson
Wed Feb 14, 2018 10:14 am
Forum: Advanced users
Topic: Raspi Cam V2.1 Change default resolution
Replies: 1
Views: 69

Re: Raspi Cam V2.1 Change default resolution

It depends on what software you are driving the camera with not on any hardware settings.
by DougieLawson
Tue Feb 13, 2018 9:45 pm
Forum: AIY Projects
Topic: RFID and Voice Hat At The Same Time
Replies: 1
Views: 107

Re: RFID and Voice Hat At The Same Time

You can easily change the RFID code to use any other pin. What RFID library are you using. Most are simple python and it will be a one line update.
by DougieLawson
Tue Feb 13, 2018 9:37 pm
Forum: Troubleshooting
Topic: My Raspberry cannot show in HDMI (but I can do remote desktop)
Replies: 5
Views: 148

Re: My Raspberry cannot show in HDMI (but I can do remote desktop)

Rename with an mv command /boot/config.txt to /boot/config.txt~ then create a new empty one with touch /boot/config.txt Then reboot and see what happens. Most TVs can play nicely with a RPi with no junk in config.txt. Try another HDMI cable, more problems on here were due to broken or substandard ca...
by DougieLawson
Tue Feb 13, 2018 8:43 am
Forum: Troubleshooting
Topic: during boot it says: failed load kernel modules
Replies: 6
Views: 199

Re: during boot it says: failed load kernel modules

Have you got an ancient version of Raspbian with an unmodified CUPS /etc/modules.d/cups.conf?
by DougieLawson
Mon Feb 12, 2018 9:30 pm
Forum: Linux Kernel
Topic: How do i upgrade kernel to 4.9.21 ?
Replies: 2
Views: 97

Re: How do i upgrade kernel to 4.9.21 ?

Why aren't you working with the current 4.14.y kernel? You're wasting your time with a 4.9 kernel.

Source here: https://github.com/raspberrypi/linux/tree/rpi-4.14.y

Build instructions here: https://www.raspberrypi.org/documentati ... uilding.md

Go to advanced search