Go to advanced search

by karlkiste
Wed Feb 13, 2013 6:33 am
Forum: General programming discussion
Topic: SPI between two RPi's
Replies: 10
Views: 4299

Re: SPI between two RPi's

SPI and I2C both require a master device and one or more slave devices. In certain setups, multiple master devices can be possible. As far as I know, the Pi can only act as a master, so a direct connection between two Pis isn't possible, not with SPI anyway. MOSI is always an output, MISO is always ...
by karlkiste
Tue Feb 12, 2013 10:35 am
Forum: General programming discussion
Topic: omxplayer does not accept stdin controls
Replies: 2
Views: 1540

Re: omxplayer does not accept stdin controls

Sorry, my fault! It works perfectly, the problem was i was sending chars faster then the frames played. If there is more than one char, the control does not work. #> echo p >/tmp/control would have toggled the pause mode No, it wouldn't. The <cr> char appended by echo would make this a two-char comm...
by karlkiste
Tue Feb 12, 2013 10:21 am
Forum: General programming discussion
Topic: omxplayer does not accept stdin controls
Replies: 2
Views: 1540

omxplayer does not accept stdin controls

Hi! using raspbian, I could use a named pipe to control omxplayer. Starting it like this: #> mkfifo /tmp/control #> tail -f /dev/null >/tmp/control #keep the pipe open all the time #> cat /tmp/control | omxplayer videofile.mkv #start the player, using the pipe as stdin Then, e.g. #> echo p >/tmp/con...
by karlkiste
Mon Feb 11, 2013 1:35 pm
Forum: Graphics, sound and multimedia
Topic: Click noise when starting analog audio sound playback
Replies: 18
Views: 18841

Re: Click noise when starting analog audio sound playback

sjmurdoch wrote: resample the audio files to 48kHz stereo
Yes, in my first posting I wrote that this solves the problem for ALSA output. However, omxplayer clicks, nevermind what sample rate the audio is. I haven't tried the latest release yet (which needs a new firmware, which might be a good omen)
by karlkiste
Mon Feb 11, 2013 9:11 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: read analog inputs higher than 3,3V using MCP3008
Replies: 7
Views: 8407

Re: read analog inputs higher than 3,3V using MCP3008

It's not a pretty solution and you will lose a bit of accuracy, but it is a simple one. I couldn't think of a prettier solution. Just two resistors, that is definetly the way I'd go. If you're calibrating the resistors in software, where's the lost accuracy? The biggest error source is usually the ...
by karlkiste
Sun Feb 10, 2013 3:52 pm
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3050

Re: Is "bash script" a relevant language?

I've successfully transfered 100MByte within 20 minutes at 1MBaud. On the sender: #> stty -F /dev/ttyAMA0 1000000 raw #> tail -f /dev/null >/dev/ttyAMA0 #to keep the device open, avoiding glitches on opening #> pv testfile >/dev/ttyAMA0 #only start after starting the receiving process On the receive...
by karlkiste
Sun Feb 10, 2013 3:30 pm
Forum: General programming discussion
Topic: Using /dev/tty1 without console
Replies: 6
Views: 4940

Re: Using /dev/tty1 without console

I do not fully understand either... But if you want to get keyboard input to somewhere else than to a getty (this is the program which writes "login:"), you'd have to modify /etc/inittab and start a different program there. I often use a line like: 1:2345:respawn:/bin/login -f pi >/dev/tty1 2>/dev/t...
by karlkiste
Sun Feb 10, 2013 3:12 pm
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3050

Re: Is "bash script" a relevant language?

The specs suggest a maximum of >3M bytes (not bits) per second. I'd be interested in how much you can reliably achieve. So, I'm wiser now... I do not have to fiddle the uart. It is uart0, the full-featured-one, activated at boot. Do not waste a thought about uart1, the "mini-uart". It could only be...
by karlkiste
Sun Feb 10, 2013 1:36 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: uart: "Uncompressing Linux..."
Replies: 12
Views: 6168

Re: uart: "Uncompressing Linux..."

Hah, simply ;-) I thought it was simple, but I can't find out how to decompress the kernel. As the usual scripts did not work, I had a little script try to gunzip the file after cutting away (n=n+1) bytes from the beginning. So this line worked: dd if=kernel.img skip=1 bs=17836 | gzip -d >kernel_un...
by karlkiste
Sun Feb 10, 2013 1:10 pm
Forum: General programming discussion
Topic: Bash: Is there a utility to change alternate pin functions?
Replies: 4
Views: 879

Re: Bash: Is there a utility to change alternate pin functio

To do what you want: gpio -g mode 14 in # Set TxD to input But do turn off the serial port first (edit /boot/cmdline.txt and /etc/inittab) and also note that the Serial port is initialised to serial mode by the GPU before Linux starts, so some text may still be output on it. Thank you! In fact I ha...
by karlkiste
Sun Feb 10, 2013 11:29 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Connecting RockBand Drums to GPIO
Replies: 5
Views: 5424

Re: Connecting RockBand Drums to GPIO

killerbobjr has put up a great essay for you, just pick from there what suits your demands.

My aproach would be different, however: I'd have a go with a simple pushbutton wired to a GPIO, and if everything works as I like, I'd start to think about interfacing the real sensor.
by karlkiste
Sun Feb 10, 2013 10:45 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: uart: "Uncompressing Linux..."
Replies: 12
Views: 6168

Re: uart: "Uncompressing Linux..."

Are there specs for the output drivers? I can't find them anywhere. The pins are rated, I'm sure. And I can't imagine why the output specs shouldn't be made public. Just like maximum source/sink current, hi/low voltage, allowable short-circuit duration, clamping diode currents and things like that. ...
by karlkiste
Sun Feb 10, 2013 10:03 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: uart: "Uncompressing Linux..."
Replies: 12
Views: 6168

Re: uart: "Uncompressing Linux..."

karlkiste wrote:
Simply using an uncompressed kernel image should avoid that message
I'll give that a try, [...]
Hah, simply ;-) I thought it was simple, but I can't find out how to decompress the kernel. Seems to be a bit different than on intel platform :-D
by karlkiste
Sun Feb 10, 2013 7:59 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: uart: "Uncompressing Linux..."
Replies: 12
Views: 6168

Re: uart: "Uncompressing Linux..."

Thanks for all the input :-) The GPU [...] does configure those pins to use the UART alt function, so TX will be configured as an output. Yes, this is OK with me. It's a good feature, and shouldn't be changed. I could live with the outputs connected to each other, if I was sure all the outputs are d...
by karlkiste
Sat Feb 09, 2013 8:36 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Raspbery Pi + Arduino Digitial Input
Replies: 1
Views: 576

Re: Raspbery Pi + Arduino Digitial Input

Who should be in danger? The arduino, if it runs on less than 5V, has to use a 5v-tolerant input. No other harm to fear.

Ground of the two power supplies must be connected, of course, to have a common reference. If they can't be connected, the opto-isolator is required.
by karlkiste
Sat Feb 09, 2013 6:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Adding 64 plus digital & analog inputs
Replies: 8
Views: 3402

Re: Adding 64 plus digital & analog inputs

Well, the "easiest and cheapest" solution is probably to slaughter a keyboard. It costs five dollars, plugs into the USB connector, and detects over 100 switches in a matrix.
by karlkiste
Sat Feb 09, 2013 5:27 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: uart: "Uncompressing Linux..."
Replies: 12
Views: 6168

uart: "Uncompressing Linux..."

" done, booting the kernel." This string is being sent through the uart at power-up. I've removed all the ttyAMA0 -stuff from cmdline, but this message is still there. I would prefer it to go away. I'm going to connect the TX lines of several Pi's together, and if they output data at boot they would...
by karlkiste
Sat Feb 09, 2013 5:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Adding 64 plus digital & analog inputs
Replies: 8
Views: 3402

Re: Adding 64 plus digital & analog inputs

[/quote] Another option is the TI Launchpad which is cheaper than most Arduinos but can be programmed with an Arduino like environment.[/quote] Thank you, I'm not into this matter specifically, I use bare PIC controllers. Of course there are other platforms, Arduino is probably the best-known one. D...
by karlkiste
Sat Feb 09, 2013 4:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Adding 64 plus digital & analog inputs
Replies: 8
Views: 3402

Re: Adding 64 plus digital & analog inputs

I'm using microcontrollers every day, so I'd take one of them. The simplest way to start with microcontrollers is the arduino family of boards. You can connect them via uart, i2c or spi. You would have another device to program, but you can easily read digital and analog inputs, compare values to pr...
by karlkiste
Sat Feb 09, 2013 2:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: What is the max clock/baud rates for SPI/I2C/Uart
Replies: 12
Views: 28575

Re: What is the max clock/baud rates for SPI/I2C/Uart

You can not send data at that speed. The GPIO pins are no fast enough. We tested the pins and the max frequency is around 100KHz but then you get more of a sinewave out instead of a digital signal. I've just seen a clean rectangle wave out of the TX pin at 4 megabaud, that is 2 MHz when sending "UU...
by karlkiste
Sat Feb 09, 2013 12:29 pm
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3050

Re: Is "bash script" a relevant language?

The CPU has at least two uarts. One of them is a quite simple one which needs relatively much CPU assistance to do transfers, and a more full-featured one which has larger buffers and therefore can use less CPU. Both uarts are wired to the same GPIO pins (GPIO14=TX, GPIO15=RX), and can therefore no...
by karlkiste
Sat Feb 09, 2013 9:00 am
Forum: General programming discussion
Topic: Bash: Is there a utility to change alternate pin functions?
Replies: 4
Views: 879

Re: Bash: Is there a utility to change alternate pin functio

What you woudn't be able to do is change TXD to be RXD or vice versa (according to my reading of the Broadcom specs). You're certainly right there. Each GPIO pin can serve a limited number of other purposes than "GPIO", but those different purposes are wired in hardware for each pin. Software can s...
by karlkiste
Sat Feb 09, 2013 8:38 am
Forum: General programming discussion
Topic: Bash: Is there a utility to change alternate pin functions?
Replies: 4
Views: 879

Bash: Is there a utility to change alternate pin functions?

Hi! I'd need to change a pin function from a bash script. In detail, I want to switch the uart TX pin to input, so I can connect several Pis in a bus-like manner. The protocol will call one of the Pis, which then will activate its TX line and can talk back to the master. Is there a way to do this, o...
by karlkiste
Fri Feb 08, 2013 9:12 am
Forum: Raspbian
Topic: Two XBMC (.deb) compiled/prepared for users + instruction
Replies: 300
Views: 132075

Re: Two XBMC (.deb) compiled/prepared for users + instructio

Configured features:
[...]
Raspberry Pi support : no
./configure does not look in the right places by itself. Run it like:

./configure --with-rpi-lib-path="/opt/vc/lib/" --with-rpi-include-path="/opt/vc/include"

the raspbian system is then detected.
by karlkiste
Wed Feb 06, 2013 10:27 am
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3050

Re: Is "bash script" a relevant language?

I'm interested in how fast you'll be driving the port. So am I :-D I was going to connect pi's (Model A) to each other using short (~10cm / 4") wires, and then rising the speed until I see them glow in broad sunlight ;-) Well, to be realistic, I wouldn't expect to use more than 1Mbaud. And I do not...

Go to advanced search