Go to advanced search

by TerryC65
Tue May 15, 2018 1:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Re: Does anyone know of an I2C device that just deals with the interfacing?

For general I/O functionality you can use the PCA9538A (Low-voltage 8-bit I2C-bus I/O port with interrupt and reset) or PCA9539A (Low-voltage 16-bit I2C-bus I/O port with interrupt and reset) by NXP Therea are also I2C bus expander to extend the bus range. I think I good idea is to take a look at N...
by TerryC65
Tue May 15, 2018 12:45 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Re: Does anyone know of an I2C device that just deals with the interfacing?

You don't define what "the right inputs and outputs" are. For digital I/O, the MCP23017 will give you 16 I/O channels per chip. For analogue inputs the ADS1015 gives you 4 channels at 12bit resolution. Do you really need PWM control on the motors? We don't need a bus expander or an A/D chip , we ne...
by TerryC65
Tue May 15, 2018 12:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Re: Does anyone know of an I2C device that just deals with the interfacing?

stevend wrote:
Tue May 15, 2018 12:34 pm
Bear in mind that the total length of an I2C bus is limited (something like 500mm, IIRC).
We're happy to buffer the signals at each end using line drivers.
by TerryC65
Tue May 15, 2018 12:42 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Re: Does anyone know of an I2C device that just deals with the interfacing?

aBUGSworstnightmare wrote:
Tue May 15, 2018 12:24 pm
Why not use an Arduino for dealing withn the motors (PWM Signal generation) and the analog sensors and let the RPI do the rest?
Too expensive. We can realise the hardware in gates, etc for pennies.
by TerryC65
Tue May 15, 2018 12:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Re: Does anyone know of an I2C device that just deals with the interfacing?

What do you mean with basic interfacing? May be I2C to GPIO or Analog to I2C? I mean Pins 2 and 3 on the Pi to the devices. The Pi deals with the interfacing and hardware at it's end, but the sensors (for example) need to have some means to interface their measurement onto the bus. This is possible...
by TerryC65
Tue May 15, 2018 11:41 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does anyone know of an I2C device that just deals with the interfacing?
Replies: 16
Views: 1240

Does anyone know of an I2C device that just deals with the interfacing?

Hi, Our Project is to manage the water in our Model Town model river. It involves lots of water butts, lots of sensors and lots of control devices. So far, we have used fairly simple interfaces to connect the sensor inputs and control outputs directly to and from GPIO pins. This works well but doesn...
by TerryC65
Sat Mar 10, 2018 4:25 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

I'm now wondering if there is something inherent in the format of the bells files that is different to the format of the music files. They came from different sources and the bells were recorded by the bellringers in the church. I then converted them using KWave on Kubuntu, so I could have chosen s...
by TerryC65
Sat Mar 10, 2018 2:43 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

I think there is a permission issue preventing access to the device, though I'm not sure why it would work once then stop working. To confirm it works with root privileges, try using sudo before each command or run your script as root ( sudo before the python script) and see if that works. If it do...
by TerryC65
Sat Mar 10, 2018 11:35 am
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

I forgot to mention that if you have two different sound devices, you should be seeing hw:0,0 and hw:1,0, not hw:0,0 and hw:0,1. Actually that was what I was doing, but I mistyped when I posted here. Having now decided (see my post above), that the TOWER is hw:2,0 and the CHANCEL is hw:1,0, I have ...
by TerryC65
Sat Mar 10, 2018 11:20 am
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

There is something you might have missed from my last post, which was that you also need to modify the .asoundrc file to force particular cards to have particular device ID/channel names, such as hw:0,0 or hw:0,1. ... In your case, you just need to modify your .asoundrc file to make your USB sound ...
by TerryC65
Fri Mar 09, 2018 3:08 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

The light at the end of the tunnel just got smaller. The two USB Audio devices now seem to come up consistently on channels hw:0,0 and hw:0,1, but The light at the end of the tunnel is rapidly vanishing. Having worked consistently for many reboots, I just got a couple of occasions when Card 0 came ...
by TerryC65
Fri Mar 09, 2018 2:32 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

More testing needed, but I may be seeing the light at the end of the tunnel (everything crossed). The light at the end of the tunnel just got smaller. The two USB Audio devices now seem to come up consistently on channels hw:0,0 and hw:0,1, but I now get the error: can't open libao driver with devi...
by TerryC65
Fri Mar 09, 2018 1:13 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Well. It did take a while, but not because the solution outlined was wrong, but because it solves the wrong problem unfortunately. I found that it works well to provide an identity for the device, so I can tie a bus or Manufacturer's ID to a label, but not to a channel ID (ie hw:x,y). I just spotte...
by TerryC65
Thu Mar 08, 2018 7:36 am
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Thanks for that. It certainly looks promising and I'll post back here when I've worked my way through it. That might take a while though... Well. It did take a while, but not because the solution outlined was wrong, but because it solves the wrong problem unfortunately. I found that it works well t...
by TerryC65
Sun Mar 04, 2018 3:17 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Thanks for that. It certainly looks promising and I'll post back here when I've worked my way through it.

That might take a while though...
by TerryC65
Sun Mar 04, 2018 2:29 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Replying to myself (again). (I've been busy on other things, so when my researches came to nothing, I put this on the back-burner.) I did sort out the cross-talk, by using audio transformers to isolate the two inputs (ie, Audio O/P Jack and USB Adaptor) but the hum is still present. I now have 3 wee...
by TerryC65
Sat Jan 20, 2018 7:44 am
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

there used to be a way to mk-node and force a new nodename for each device then point the software to the separate nodes but I can't remember how I did this. I know I used a similar trick to get GPSD to work. The local LUG Mailing List denizens have pointed me at a few sites to do this, but I haven...
by TerryC65
Sun Jan 14, 2018 6:25 pm
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Re: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Replying to myself. There's been some discussion about this on my local LUG Mailing List, but I've had problems posting the output of aplay -l after a reboot, so here it is: terry@OptiPlex:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 1: Device [USB PnP Sound Device], device 0: USB Au...
by TerryC65
Sat Jan 13, 2018 10:23 am
Forum: Graphics, sound and multimedia
Topic: Identify Audio Channels (hw:x,y) for two USB Audio Adaptors
Replies: 18
Views: 3733

Identify Audio Channels (hw:x,y) for two USB Audio Adaptors

Hi, Way back in Nov 2016, I posted a query about playing two mp3 files simultaneously through two independent USB audio adaptors for my local Model Town. I got it to work, see https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=164784&p=1066454#p1066454 , but then fell at the next hurdle because...
by TerryC65
Fri Jul 14, 2017 12:00 pm
Forum: Advanced users
Topic: Problems Executing a Script when a Particular User Logs In
Replies: 4
Views: 657

Re: Problems Executing a Script when a Particular User Logs

RaTTuS wrote:yes this will do what you want ;)
I've now got it working and by plugging the SD Card into a Pi 3, I've tested the SSH side as well! Now why didn't I think of that before :)

Thanks again.
by TerryC65
Fri Jul 14, 2017 10:36 am
Forum: Advanced users
Topic: Problems Executing a Script when a Particular User Logs In
Replies: 4
Views: 657

Re: Problems Executing a Script when a Particular User Logs

if you have a system that auto logs you on Yes, the system is auto logging on to the Pi user. the best way [IMO] of running a script for that user is to edit .bashrc and have at the end of it something like So this method of launching the script is instead of using /etc/profile and will allow me to...
by TerryC65
Fri Jul 14, 2017 9:51 am
Forum: Advanced users
Topic: Problems Executing a Script when a Particular User Logs In
Replies: 4
Views: 657

Problems Executing a Script when a Particular User Logs In

Hi, I have been running a sensor monitoring script on a Pi Zero which starts on boot-up. This is fine, but the system is installed in a fairly inaccessible place and running headless, so it isn't easy to keep an eye on it without hauling it out and fitting a monitor and keyboard. I hit on the idea o...
by TerryC65
Tue May 16, 2017 2:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using 1-Wire to Monitor Data from Many Distributed Sensors
Replies: 14
Views: 1774

Re: Using 1-Wire to Monitor Data from Many Distributed Senso

I'm successfully using 1-wire bus with a DS2483 line interface chip over distances up to 30m or so; pretty reliable. Your 100m might be pushing it, especially if that's as the crow flies - going up and down and round things can add an amazing amount to cable lengths! Yes. That was was triggered the...
by TerryC65
Sun May 14, 2017 1:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using 1-Wire to Monitor Data from Many Distributed Sensors
Replies: 14
Views: 1774

Re: Using 1-Wire to Monitor Data from Many Distributed Senso

This looks interesting: http://www.raspberrypioneer.com/2013/06/13/how-to-run-your-raspberry-pi-from-poe-for-under-15/ (if the equipment is still available) and it's definitely cheaper than the PoE Switch HAT (for £25-30). Run a few RPi1B+ machines that way. https://www.amazon.co.uk/d/Splitters/TP-...
by TerryC65
Sun May 14, 2017 1:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using 1-Wire to Monitor Data from Many Distributed Sensors
Replies: 14
Views: 1774

Re: Using 1-Wire to Monitor Data from Many Distributed Senso

Can you use an RPi as a 1-wire slave? I'd missed that implication in your description: it might be possible but the usual model discussed here has the RPi gathering data from discrete stand-alone sensors. I think you might be treading new ground here. I think that you may be right :( Presumably it ...

Go to advanced search