No audio in SonicPi using Raspi 2B - raspberry-pi2

Just starting with SonicPi but getting no audio from analogue out (headphone socket).
.WAV's placed on Pi play fine using both 'phones and powered speakers but when I launch Sonic Pi and run the very basic program in SonicPi - Nothing.
I expect its blindingly obvious...

This is something I discovered with time practising Sonic pi and there is for sure a better answer :
everytime you want to use an audio output that were not connected before you launched the software, it will not work properly (no audio out).
If you want to switch from headphones to a powered speakers, you have to relaunch the software and it is working.

Related

Silicon Labs CP2102 interface. How to talk using minocom

I have an infrared thermometer which operates on a virtual serial port over USB, which I am trying to use on a Linux intel and next on a raspberry Pi. The system did not enumerate a /dev/ttyUSB device.
I found a piece of a solution here :
Cygnal Integrated Products serial port on Linux
I reprogrammed the product_ID and can now see it as /dev/ttyUSB0.
But trying to talk to the thermometer with minicom doesn't work.
minicom keeps saying "disconnected" despite the "9600 8N1" indication.
I must say, I had many attempt to work with this kind of communication over USB/serial adapter trying using many different terminal emulator like screen or minicom but without any success at all !
I'm not even sure about the right way to send request and receive data.
Here is the documentation I'm using trying to talk to the thermometer :
http://www.optris.com/interfaces?file=tl_files/downloads/Manuals/addendums-de-en/ct-ctlaser-commands.pdf
Edit :
I'm now trying to use PySerial Python library in a Python script with an Arduino as a target (to act as my thermometer, the arduino runs a simple code that takes the data received and send them back to my Python console.) But still, there is so many confusion possible between ASCII, Hexa, binary, that I'm not capable of debugging anything as I don't know where the transformation between different format takes place !
The communication is working as I can get some data forth and back from my Python console through the Arduino. But I can't get sending hexadecimal data and getting any response back in hexadecimal format. + You say "Your latest question puts you in the off-topic category. ", what do you mean ? Sorry of being so confused.

Raspberry camera error: "mmal: No data received from sensor"

I used successfully my raspberry camera times ago.
Now I tried again to acquire a image with the raspistill -o image.jpg command; the red led on the camera flashes, but I get this error:
mmal: No data received from sensor.
Check all connections, including the Sunny one on the camera board
Of course the camera connections are fine. Is there any other way to check if the camera is still working?
This error usually appears because of a faulty connection with the camera.
I had the exact same problem in different camera+Pi configurations. The following case is what I encountered:
The connector is not correctly inserted either in the camera or in the Pi.
The Sunny connector (the small yellow one on the camera) is not connected well.
(now it gets interesting)
If you often remove and reinsert the camera in the Pi please be sure to remove all power from the Pi. The sensor is very sensitive and a spark on the wrong pin could burn it. (I did this already unfortunately)
This could also trigger a problem with the Pi connector pins. It was somewhat confirmed that for Pi2 the connector may have some bad soldering which could lead to cold contact soldering. You can fix this by using some flux on the pins and then pass the soldering iron hot end over the pins to remake the connection.
I used a longer cable that had both connectors on the same side of the cable. If you connect it like it is you can burn your sensor and the Pi will not start because of the power surge (also the camera gets very hot in this case). DO NOT REMOVE IT from the Pi without removing power before. To a cable like this you have to remove the blue plastic from one end and bend the connector with the contacts on the other side. Insert this end in the camera since this will not be removed/inserted as often as the Pi end.
Make sure that the silver contacts are well inserted into the PCB connector.
(video here)
Also, make sure that the sunny connector is firmly attached.
This fixed it for me.
I was experiencing the same problem too, until I found a solution.
I removed the sunny connector(the yellow thingy below the camera in the board) and fixed it in the same place. The camera is working fine after trying this.
I have got the same issue. I have find out it was a power supply issue.
Try to change your cable and/or your raspberry power supply adaptor.
You check if this is your reason of your problem by typing:
$ dmesg
if you see something like this:
[ 44.152029] Under-voltage detected! (0x00050005)
-> Then replace your power supply! :D
The only fix for me was to purchase a new camera.
No real root causes identified.
My problem was I put the camera in, while the Pi was on. which might
have made the camera shot. i.e the camera module is static sensitive
and it's possible that it's been damaged
Unfortunately if this is the case there's nothing you can realistically do to fix it, just get a replacement.
This specific error shows when another application is using the camera. In my case, it was motion.
It might be possible that the cable is placed the wrong way. I had this problem and after multiple tries I realized that was the problem.

AT command sent to modem from microcontroller is ignored

Please help, I spent hours trying to rootcause the problem.
Setup: MSP430 (F5529 microcontroller), HW UART (USCI_A0) and modem connected (uBlox Leon G100). I am sure the USCI_A0 port works well because if I connect it via USB-to-RS232 to the PC I can see the correct traffic.
A simple
uart_puts(UART_MODEM, "AT+CPWROFF\r");
shall put AT+CPWROFF to the modem. And it probably does but modem does not power off. If I simply connect modem to PC and type "AT+CPWROFF" finished by Enter then the modem powers off.
I also confirmed on the PC console that the "\r" works well - it just returns the carriage, correctly. Tried "\n\r", does not work either. Checked in the modem settings for S3 character and it's 013 (CR or \r).
I have no idea what is wrong. PC-to-modem works well (I can power off the modem), MSP430-to-PC works ok (I can see that the microconroller really puts AT+CPWROFF\r on the UART), but MSP430-to-modem does not work.
I can determine if the modem is turned on or off by looking at the current consumed.
Please, any hints?
OK, issue solved. If you take a look at the detected baudrate on the links I sent, you will notice that with PC the exact baudrate was 9585 (which is 0.14% of sync difference) while with the MCU it is 7862 (which is 2.73% of sync difference). I switched to 4MHz crystal and now have approx 0.23% out of sync. It's really wondering that the DCO gives so unstable clock.

abt naudio input and output devices

I am pretty new to Naudio, trying to understand it,
I require the following to be done in my application
I have couple of devices connected to my system
say
1) head set - with a mic
2) inbuilt system mic and speakers
I require to do the following
the audio from the two input devices(headset mic and system mic) should be mixed and a byte array needs to be constructed. how can this be done using naudio
Also, the system speakers and headset would receive a stream that needs to played on both
any concept ? or classes that i can use ?
That depends on the type of headset:
If the headset plugs into the sound-card's audio jacks (with a pair of 3.5mm plugs for instance) then you can't target the headset's speakers and microphones as distinct from the system's speakers and microphone. They are indistinguishable, except in very rare configurations.
If the headset is connected via USB then you can use the device enumeration options to select the device to attach to. In this case you might be able to independently address the different microphones and speakers... try it out and see.

Voice commands for Huawei GSM/UMTS usb dongles?

I am trying to find out how to use voice functions with a HUAWEI E173 dongle in linux.
My dongle is voice enabled (voice works with the windows application).
I can check the voice activation in linux using the AT^CVOICE? command.
This tells me how the raw audio stream should be organized.
From question How make use of the Voice API to make calls using Huawei 3g Modems? I understand that the idea is to
send commands on ttyUSB2 while passing raw audio data on ttyUSB1.
I also understand that stack overflow user https://stackoverflow.com/users/1043421/sai-chaitanya has voice working in Ubuntu in this way, so that this should indeed be the right approach.
What is completely unclear to me is how to dial out voice calls, to check if someone is calling and to answer voice calls.
Can anyone provide some clue or some pointer on this?
Thanks!
To do those, you need to use AT commands on the same interface as the one you entered the AT^CVOICE? command.
For example, dialing a certain number (+1 234 567 8888 in this case):
ATD+12345678888;
You see an incoming call on the terminal with the "ring" or "RINGING" indication. You can use 'ATH' to hang up or 'ATA' to answer.
Read more about AT commands, also called the Hayes command set here:
http://en.wikipedia.org/wiki/Hayes_command_set