Go to advanced search

by Pharsea
Tue Mar 03, 2020 11:25 am
Forum: Graphics, sound and multimedia
Topic: Internet radio
Replies: 1
Views: 269

Re: Internet radio

The following works:

>> chromium-browser --headless --remote-debugging-port=9222 https://tunein.com/radio/Planet-Rock-s2377/ &

Simple when you know how!
by Pharsea
Tue Mar 03, 2020 10:48 am
Forum: Graphics, sound and multimedia
Topic: Internet radio
Replies: 1
Views: 269

Internet radio

I want to be able to listen to Internet radio on my R-pi3. I can do so, easily, via a Web browser, such as chrome. >> chromium-browser https://tunein.com/radio/Planet-Rock-s2377/ However, this involves having the browser open and assigned to a terminal. For good reasons, that I don't think are relev...
by Pharsea
Wed Nov 13, 2019 10:26 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Python code which interfaces with the OU Sense Board.
Replies: 3
Views: 680

Re: Python code which interfaces with the OU Sense Board.

The SenseBoard protocol document is what my Python code is based on.
by Pharsea
Wed Oct 30, 2019 6:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Python code which interfaces with the OU Sense Board.
Replies: 3
Views: 680

Python code which interfaces with the OU Sense Board.

#! /usr/bin/env python # # Code to interface with the OU Sense Board. # author: Stephen C. Lovatt 30th Oct 2019 # Stephen.Lovatt-01@VirginMedia.com # pharsea@yahoo.co.uk import serial import time import io import os # ser = serial.Serial( port='/dev/ttyUSB0', baudrate = 115200, parity=serial.PARITY...
by Pharsea
Wed Oct 30, 2019 6:05 pm
Forum: HATs and other add-ons
Topic: Open University "Sense" board and the Pi
Replies: 24
Views: 22150

Re: Open University "Sense" board and the Pi

Here is a Python code I have written to interface with the OU Sense Board. #! /usr/bin/env python # # Code to interface with the OU Sense Board. # author: Stephen C. Lovatt 30th Oct 2019 # Stephen.Lovatt-01@VirginMedia.com # pharsea@yahoo.co.uk import serial import time import io import os # ser = s...
by Pharsea
Thu Oct 24, 2019 11:51 am
Forum: Troubleshooting
Topic: "chmod" and "chown" don't work on USB memory sticks
Replies: 9
Views: 516

Re: "chmod" and "chown" don't work on USB memory sticks

The memory sticks are formatted as FAT32.

Does this also explain why I can't execute binary files?
The exact same binary file (the original copy)
executes fine from the PI's bootable memory card.
It is a compiled "c" program.
by Pharsea
Thu Oct 24, 2019 11:45 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

Re: I2C intermittent failure with BMP280 sensor

I have found that powering the BMP280 down and then back up again clears the problem.
Hence I should be able to deal with this by getting the GPIO to do the job of interrupting the power when the problem manifests.
by Pharsea
Thu Oct 24, 2019 8:50 am
Forum: Troubleshooting
Topic: "chmod" and "chown" don't work on USB memory sticks
Replies: 9
Views: 516

"chmod" and "chown" don't work on USB memory sticks

I have just noticed that the linux commands chmod and chown do not work on two USB memory sticks I have mounted on my R-pi3. When I type "chmod 777 fraggle.exe" I get no error message, but the mode remains what it was before I issue the command. Prefixing with "sudo" doesn't help. When I type "sudo ...
by Pharsea
Thu Oct 24, 2019 7:52 am
Forum: Troubleshooting
Topic: Problem with aplay: "set_params:1363: Unable to install hw params"
Replies: 2
Views: 1549

Re: Problem with aplay: "set_params:1363: Unable to install hw params"

I have more recently observed the following behviour. The BT link is now reasonably stable and entirely useble. However, occasionally it goes wrong and I get the "unable to install" error message; but then it always clears - all by itself - when I persist in attempting to use aplay. I am now wonderi...
by Pharsea
Thu Oct 24, 2019 7:45 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

Re: I2C intermittent failure with BMP280 sensor

Are you sure you have strapped the address bits properly to ground or 3V3? These modules usually have a pin to select address 0x76 or 0x77. Yes, I am sure. The two modules used to work together just fine, then something changed and the fault I described manifested. For a while I have accepted the s...
by Pharsea
Thu Aug 15, 2019 8:52 am
Forum: HATs and other add-ons
Topic: Open University "Sense" board and the Pi
Replies: 24
Views: 22150

Re: Open University "Sense" board and the Pi

I have an OU "Sense Board" which is working with my Raspberry Pi. I have the following issues/questions. 1. When Sense scans for a USB port, it never finds one; but if I tell it (via a "right-click" on the "watcher") to use "port 0" it works. 2. Once I get it working, it regularly drops out after a ...
by Pharsea
Tue Jun 25, 2019 7:05 am
Forum: Troubleshooting
Topic: WiFi stopped working
Replies: 1
Views: 475

WiFi stopped working

I have had my R-Pi 3 happily connected to my home WiFi network for some time. Recently, I have experienced a lot of problems with various things - too complicated to go into here. I believed that I had resolved them all, but now I notice that the Pi will not connect to my WiFi at all. I changed noth...
by Pharsea
Tue Jun 25, 2019 6:51 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

Re: I2C intermittent failure with BMP280 sensor

Thanks for the responses. Both sensors are in modules and have hence been protected from damage from the 5V suupply. I was mostly concerned about possible damage to the Pi itself; but this seems to have survived OK. The current status is that I have the one module (Temp - Press - Humid) working from...
by Pharsea
Fri May 10, 2019 8:14 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

Re: I2C intermittent failure with BMP280 sensor

Changing the power supply arrangements has not improved the situation. The BMP280 with address 77 once again failed after an hour or so on the R-pi 3B with a power-supply of 3.3V. The BME280 with address 76 was fine. I have now connected the BMP280 with addtess 77 up to the R-pi 1 (power supply 3.3V...
by Pharsea
Thu May 09, 2019 9:28 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

Re: I2C intermittent failure with BMP280 sensor

I have just realised (on a more careful reading of the description of the BMP280 module) that I have been powering it incorrectly from 5V rather than 3.3V. The WebPage I had been working from was NOT for the R-pi, which I understand uses 3.3V logic. I have now changed over to running both the BMP280...
by Pharsea
Thu May 09, 2019 8:58 am
Forum: Troubleshooting
Topic: I2C intermittent failure with BMP280 sensor
Replies: 9
Views: 1069

I2C intermittent failure with BMP280 sensor

R-pi 3B with Rasberrian Linux. For many months I have been using one BMP280 sensor module and one BME280 sensor module in parallel on the pi's I2C bus with no problems. The BME280 has I2C address 76 and the BMP280 address 77. Suddenly the BMP280 with address 77 "vanished". What I mean is that "i2cde...
by Pharsea
Thu Mar 28, 2019 7:52 am
Forum: Troubleshooting
Topic: Problem with aplay: "set_params:1363: Unable to install hw params"
Replies: 2
Views: 1549

Re: Problem with aplay: "set_params:1363: Unable to install hw params"

I used "sudo-apt purge" to rid myself of all the bluetooth software that I had installed. I then re-installed it all again. Somehow, this resulted in my R-pi3 not knowing about its internal UART bluetooth adapter! I then started using an old USB bluetooth dongle - and this worked. It has been runnin...
by Pharsea
Wed Mar 27, 2019 7:11 pm
Forum: Troubleshooting
Topic: No bluetooth adapter found
Replies: 2
Views: 234

Re: No bluetooth adapter found

THANKS!

That worked.
by Pharsea
Tue Mar 26, 2019 1:12 pm
Forum: Troubleshooting
Topic: No bluetooth adapter found
Replies: 2
Views: 234

No bluetooth adapter found

Raspberry Pi 3B
Rasberian OS

I was having some bluetooth problems, so I decided to "apt-get purge" all my bluetooth related software and then reinstall it.

Now I have no bluetooth adapter installed!

How can I re-install the on-board hci0?
by Pharsea
Fri Mar 01, 2019 7:41 am
Forum: Troubleshooting
Topic: Problem with aplay: "set_params:1363: Unable to install hw params"
Replies: 2
Views: 1549

Problem with aplay: "set_params:1363: Unable to install hw params"

I have been successfully using the command aplay -D bluealsa:HCI=hci0,DEV=EB:06:BF:19:C2:D3,PROFILE=a2dp Open.wav to play sound over a BlueTooth device. HOWEVER after a few hours of trouble free opperation, I suddenly started getting the following error message: Playing WAVE 'Open.wav' : Signed 16 b...
by Pharsea
Fri Mar 01, 2019 7:36 am
Forum: Troubleshooting
Topic: Switching between Bluetooth sound and Audio Jack O/P
Replies: 3
Views: 225

Re: Switching between Bluetooth sound and Audio Jack O/P

Try this in /etc/asound.conf pcm.btheadset { type plug slave.pcm { type bluealsa device "EB:06:BF:19:C2:D3" profile "a2dp" } That was how I got my BT headphones working with Kodi 18.1. I realised that the ".asoundrc" file was my problem and so emptied it out. I have defined an alias including the b...
by Pharsea
Wed Feb 27, 2019 11:23 am
Forum: Troubleshooting
Topic: Switching between Bluetooth sound and Audio Jack O/P
Replies: 3
Views: 225

Switching between Bluetooth sound and Audio Jack O/P

I would like to be able to switch between hearing sound via a Bluetooth device and the Audio Jack, preferably by using a UNIX command line. At present, I have the following - incomprehensible! - ".asoundrc" file: pcm.!default { type plug slave.pcm { type bluealsa device "EB:06:BF:19:C2:D3" profile "...
by Pharsea
Sat Feb 23, 2019 6:19 pm
Forum: General programming discussion
Topic: Problem with "if" statement in BASH
Replies: 5
Views: 1430

Re: Problem with "if" statement in BASH

1. The "shebang makes" no difference. I had tried that already. 2. I was running the file as "bash test.sh". 3. Of course the file was executable. If it hadn't been executable I wouldn't have gotten the error message I did get. I am having problems using the BASH shell "if" statement. if ($Temperatu...
by Pharsea
Sat Feb 23, 2019 6:16 pm
Forum: General programming discussion
Topic: Problem with "if" statement in BASH
Replies: 5
Views: 1430

Re: Problem with "if" statement in BASH

Thank you VERY much.
Both work fine.


rpiMike wrote:
Sat Feb 23, 2019 1:45 pm
Try these 2 options, note spaces next to '[' and ']' are important:

Code: Select all

#!/bin/bash

Temperature=6
CompareTemp=5

if ((Temperature > CompareTemp)); then
    echo "Too hot (a)"
fi

if [ "$Temperature" -gt "$CompareTemp" ]; then
    echo "Too hot (b)"
fi

by Pharsea
Sat Feb 23, 2019 1:12 pm
Forum: General programming discussion
Topic: Problem with "if" statement in BASH
Replies: 5
Views: 1430

Problem with "if" statement in BASH

I am having problems using the BASH shell "if" statement.

if ($Temperature>5)
then
echo "Too hot"
fi

does not work.

I get the error message:

"command not found"

any suggestions?

Go to advanced search