Cool ProjectsGeneral

Car project

userHead marek196c 2016-09-26 00:34:06 12572 Views10 Replies
So, as many people I wanted to do the pc in car.
but I never used an arduino etc... however I used to programming and got intermediate knowledge of electronics.
So project is to put LP as heart of multimedia, My car is an audi a3 from 2005 year with single din concert II (2) radio. I wanna to pin LP as cd changer (got connector with analogical audio input + clk + signal in and out and V+) with possibility to use signal code to communicate between radio and LP (play pause next etc...). Then need to implement some battery as temporary power source for cranking time, and as psu when is without power from car that need to last at least in sleep mode for 1-2 days (the LP will go to sleep mode instead of power on/off any time I use car).
Before I used the 2connects device to emulate the cd changer and use usb drives for playing mp3 songs.
Meanwhite I'm looking if with arduino on LP I can use it like programmer for get the codes to and from radio for each command. this device using STM32F102C8T6 to interface radio and USB reader chip (bu9458kv). Or if not implement an code to listen binary code with freq. of 16kHz and just plug it to radio and then from codes read use them as commands to LP.
So for this I need to know if I can look inside it and see commands codes, how i can control the windows player with LP and then if LP can generate clock of around 16kHz?
About programming, meanwhile I didn't got LP I've done simple c++ program that simulate impulse from radio to LP and viceversa:

Code: Select all

#include <stdlib.h> #include <conio.h> #include <stdio.h> #include <windows.h> #include <wmp.h> int pin1; // pinout of arduino for see if the power is from battery or if its from car void Play (void); int a void main (void){ pin1 = 1; system("color f9"); if(pin1==0){ Sleep(2000); // system("%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby"); return; } else Play(); return; } void Play (void){ char p='0'; while (pin1!=0){ printf ("enter char:\n"); char b; b = getch(); if (b=='0'){ return; } if ((b=='p')&&(p=='0')){ // m_BackgroundPlayer.GetControls().play(); printf ("\nplay\n"); p='1'; b='1'; } if ((b=='p')&&(p=='1')){ // m_BackgroundPlayer.GetControls().pause(); printf ("\npause\n"); p='0'; b='1'; } if (b=='s') printf ("\nstop\n"); //b=='s' is as code sent form radio on button press and printf is as action to do in player if (b=='n') printf("\nnext\n"); //effective code should be like if(b=='0101010010110') WMPlayer(next); if (b=='b') printf("\nback\n"); if (b=='j') printf("\nnext playlist\n"); if (b=='h') printf("\nback playlist\n"); if (b=='q') printf("\nforward\n"); if (b=='w') printf("\nrewind\n"); // itoa(pin1,b,10); } return; } After all I will need to stepdown and stepup the signal as I think that signal from radio coming in 12v