[Q] Frequency counter & servocontroller from my old SPV - Windows Mobile Software Development

Hi developers.
I want to use my old Smartphone as a PID controller for car's cruise control.
My idea is to use the phone as a frequency(RPM) counter and depending on some conditions it should control small servomotor connected to accelerator.
For this I want to use microphone input(500-7000Hz),which should the software measure and speaker output for control pulses(pulse generator) of model-servo(50Hz,pulse width 1-2ms depending on the desired position). All PID will calculate the software.
So I need a help,how to measure frequency of pulses on microphone input,play "sound" with calculated pulses and how to make this in software?
I am EmbeddedVisualC developer.
Thanks for your replies.

Related

[IDEA] Automatic volume control while listening to music

Hello everyone,
An idea just popped in my head, what do you think:
A program that changes the device volume/volume in the music-player according the noise it picks up from the outside via the phone's mic.
For example if you sit on a bus that has a pretty loud engine the music would become louder (preferably you can define by how much, maybe by defining a maximum, or assigning each noise level an arbitrary volume which is comfortable for you) but as soon as you get off the bus and the environment is a lot quieter it would drop down to normal/other predefined.
I googled a little bit, but couldn't find anything like, that, so what do you think? I don't consider myself as a programmer, so if any developers are interested feel free to actually make the program happen, I would be more than happy to use it.
Others: opinions are welcome!
Thanks,
DOMy
Honestly I'd be interested in something like that, but only to get white noise to try and lower environmental noise: I'd like volume changing ability only for the MP3 player, to recognize actual speed and turn up/down according to that. It's a feature you can find in stock, factory default car audio system (my wife's 2005 Micra, not a full optional, has got that), battery drain wouldn't be a problem as I always plug my ppc to the car cradle when I drive.
teorouge said:
Honestly I'd be interested in something like that, but only to get white noise to try and lower environmental noise: I'd like volume changing ability only for the MP3 player, to recognize actual speed and turn up/down according to that. It's a feature you can find in stock, factory default car audio system (my wife's 2005 Micra, not a full optional, has got that), battery drain wouldn't be a problem as I always plug my ppc to the car cradle when I drive.
Click to expand...
Click to collapse
I get the idea exactly from the car-factories, the volume changing according to the speed works great

[Q] Tough question: sound types

Here's a tough question - not necessarily difficult to answer, but difficult to ask correctly.
Is there any possibility to change the "sound type" of a particular program without actually having access to the program source code (e.g. via an external application/setting)?
By "sound type" I mean the value which is shown when you use the side volume keys while the program is running. E.g. when playing music and you use the vol+/-, it will display "Media volume", when in the Home screen and you use the vol+/- it will say "Ringer volume" etc.
I'm using the Desire as my main in-car device. The sound goes over Bluetooth to a Motorola T505 handsfree/FM transmitter and from that one to the car radio via FM (yes, old car radio, no built-in Bluetooth).
The reason for which I need to change the sound type is because if they sound types are different, they can be adjusted independently - i.e. music volume to 50% and ringer volume to 30%, so that I don't get a heart attack when the phone rings.
The problem is that my navigation software (iGo Amigo) and HTC Media player both seem to use the "Media volume" designation for their sound output, so I cannot adjust them separately. This results either in listening to a very loud navigation or to low volume music. Other navigation software have their sound type as "Alert volume", so they can be set separately.
Any idea how/if this can be changed somehow? The Desire is completely stock, unbranded, running 2.2 and the latest OTA updates.
Thanks!
LE: in more elevated terms, this is the thing (well, the other way around) - http://stackoverflow.com/questions/2744752/enable-media-volume-slider-in-android-application
airwave88 said:
Here's a tough question - not necessarily difficult to answer, but difficult to ask correctly.
Is there any possibility to change the "sound type" of a particular program without actually having access to the program source code (e.g. via an external application/setting)?
By "sound type" I mean the value which is shown when you use the side volume keys while the program is running. E.g. when playing music and you use the vol+/-, it will display "Media volume", when in the Home screen and you use the vol+/- it will say "Ringer volume" etc.
I'm using the Desire as my main in-car device. The sound goes over Bluetooth to a Motorola T505 handsfree/FM transmitter and from that one to the car radio via FM (yes, old car radio, no built-in Bluetooth).
The reason for which I need to change the sound type is because if they sound types are different, they can be adjusted independently - i.e. music volume to 50% and ringer volume to 30%, so that I don't get a heart attack when the phone rings.
The problem is that my navigation software (iGo Amigo) and HTC Media player both seem to use the "Media volume" designation for their sound output, so I cannot adjust them separately. This results either in listening to a very loud navigation or to low volume music. Other navigation software have their sound type as "Alert volume", so they can be set separately.
Any idea how/if this can be changed somehow? The Desire is completely stock, unbranded, running 2.2 and the latest OTA updates.
Thanks!
LE: in more elevated terms, this is the thing (well, the other way around) - http://stackoverflow.com/questions/2744752/enable-media-volume-slider-in-android-application
Click to expand...
Click to collapse
does igo not have an internal volume adjustment? i know copoilot does, so i can set my media volume to full and then adjust the actual volume level off the app independently
None that I could find, it seems to be stuck with some default values (iGo MyWay 2009).
Wondering if in Android there's an iGo configuration file similar to sys.txt on WinMo... might be able to set it there.

[Q] While docked, can't adjust volume Bluetooth audio

While using the OEM dock, Bluetooth audio level is locked. I can adjust the volume with the up/down buttons, the level shows that it changed, but it is still at max. The problem is that at this setting while in the dock, audio is distorted. If I remove the phone from the dock, the level is adjustable again, and I can set it so it doesn't distort...
So I am the only one with this problem??
No, no you're not. I, too, have this problem. My attempts to leverage the collective knowledge of these forums has returned no useful results. In fact, most of the time it returns results that have proven negatively helpful to my situation.

[Q] How to connect phone to receiver?

Hey everybody, my friend recently gave me his old yamaha receiver. the model is RX-V2095. I got the speakers to work but it only works when the effect [on] mode on the receiver is turned on. Problem is it sounds extremely bad and i would like to adjust my own bass and treble settings. im using a rca female cable and connecting a 3.5mm jack from my phone to the end of the rca cables which are connected to my receiver.
this will be very hard to help over the internet but i will give it a try.
Here is the user manual for the device:
http://download.yamaha.com/api/asset/file/?language=en&site=usa.yamaha.com&asset_id=856
You have the correct output set as CD. But i noticed on the front for line out record it shows CD. I would rotate that knob so its pointing up (remote select)
i noticed that you are using channel A and B. Do you have 2 sets of speakers plugged in? If not, i would suggest turning off one channel A or B which ever is not in use. (older receivers might split power between the channels when both are set to on)
you will also need to take it out of "surround mode" and put it on stereo mode. this will remove most effects and you should be able to control EQ with the knobs in front.
synisterwolf said:
this will be very hard to help over the internet but i will give it a try.
Here is the user manual for the device:
http://download.yamaha.com/api/asset/file/?language=en&site=usa.yamaha.com&asset_id=856
You have the correct output set as CD. But i noticed on the front for line out record it shows CD. I would rotate that knob so its pointing up (remote select)
i noticed that you are using channel A and B. Do you have 2 sets of speakers plugged in? If not, i would suggest turning off one channel A or B which ever is not in use. (older receivers might split power between the channels when both are set to on)
you will also need to take it out of "surround mode" and put it on stereo mode. this will remove most effects and you should be able to control EQ with the knobs in front.
Click to expand...
Click to collapse
Thanks you, i figured most of it out but i don't have the remote to change those settings and set the speakers to small to allow my subwoofer to play. Does best buy have anything that will work with this as a remote?
nty123 said:
Thanks you, i figured most of it out but i don't have the remote to change those settings and set the speakers to small to allow my subwoofer to play. Does best buy have anything that will work with this as a remote?
Click to expand...
Click to collapse
Your phone has an IR blaster and there are some apps in market that could do it.
I have a Logitech harmony 650 remote that controls my sony receiver. you could check their website out and see if itll work for you.

HIFI DAC Help( Audio Experts needed! )

Hi guys. I downloaded an app called Android hidden settings from the play store. I already use settings database editor as well as the hidden settings magisk module, but I saw if one thing inside this app I haven't seen anywhere else. There is a setting called Hi Fi DAC pop up. When you click on it floating window opens and it gives you the option to turn on DTS x and the hi-fi quad DAC. you can toggle the switch is regardless of whether or not you're playing music so I figured this wouldn't do anything. This is what I noticed:
When the floating window first appears, DTS is already enabled, I disabled it and toggled the DAC switch to the on position and proceeded to open my music player. From here I opened the full settings menu and clicked on the sound effects section to check if the DAC was switched on in the phones full menu and the toggle is actually still set to the on position. Figuring there would be no change in sound, I messed with the left and right channels anyway as well as the sound preset and digital filter. Before I go further I forgot to mention that I do not have headphones plugged in, I am playing music directly through the phone speaker. To my surprise, the audio quality does change and the volume is limited to 75 as if a headset was plugged in.
I opened up the Flinger Dump app to check audio output details but it is very limited to what it shows. I'm wondering if anyone with more knowledge on the topic and the proper tools could do some further testing and see what changes actually occur. I use UAPP, and its output is showing differently then flinger dump is. Could be a complete waste of time, could lead to something further...
If I have not misunderstood, what you mean is that with that app, you inadvertently activated the dac or the dts for the speaker's sound channel, right? If so, it would be amazing to be able to modify how the dac behaves without headphones. Perhaps it could be activated for the speaker, perhaps not, but what you propose is very interesting.
I'm honestly not sure. I don't believe so, but it's definitely done something and I don't have the knowledge or the software to see exactly what has changed. Basically, unless you have headphones or an auxiliary cord plugged into the phones Jack, you can't toggle the Hi-Fi DAC button to the on position as I'm sure you're fully aware of. This hidden shortcut allows it to be toggled on without anything plugged in to the headphone jack. I played some tracks thinking that there is a 99.9% chance that the audio quality wouldn't change ( or the sound wouldn't change, I don't know about quality ) but to my surprise it did change the sound. As long as the DTS:X is turned off, all of the other options had some sort of effect on the audio. The sound preset, the digital filter and the left and right channel knobs all had some sort of effect on any audio I played through the phone's internal speaker, and the volume limit changed from 100 down to 75, exactly how it would behave if headphones were plugged in.
I just need someone to help figure out exactly what this is changing, because my music app is showing 16bit and various Khz from the 300 range to over 1000...and as you can see from the screenshot the FlingerDump app is showing 24bit to 32bit and depending on the track but the KHZ remains the same.
It may be a dead end, but I figured that since there is an actual change in sound.... there may be a possibility for someone with more knowledge than me to take this and run with it and see where it leads. I removed all of my audio mods except for JamesDSP and John Fawkes DTS tuning because every other mod made my phone upsample everything from 44.1 to 48 and it was pissing me off. The results above were with USB Audio Player Pro, but I disabled bit perfect mode when I tested this out in order to avoid interference with the results.
I'm on stock android q (through fota) and out of curiosity i tried that. Nothing happened. I can tap it and nothing. The same with dts settings. Turning quad dac to small speaker for me have no sense. Idk how circuits looks, but i think system itself don't let reroute signal through dac to speaker. BUT if ypu want to check then try that.
Open terminal app and type
su -c tinymix
And look for what is on screen.
If it's state is closed then quad dac is not working. If state is hifi, then it's working.

Categories

Resources