![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||
PC PPC | |||||||||||||||||||||||
Modify | |||||||||||||||||||||||
-----------here is an example of how to do 1 wav sound Const FILE_NAME = "\Windows\alarm1.wav" Public Enum PlaySoundFlags SND_SYNC = &H0 SND_ASYNC = &H1 SND_NODEFAULT = &H2 SND_MEMORY = &H4 SND_LOOP = &H8 SND_NOSTOP = &H10 SND_NOWAIT = &H2000 SND_ALIAS = &H10000 SND_ALIAS_ID = &H110000 SND_FILENAME = &H20000 SND_RESOURCE = &H40004 End Enum Declare Function PlaySound Lib "coredll.dll" (ByVal szSound As Char(), ByVal hMod As IntPtr, ByVal flags As PlaySoundFlags) As Integer Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click PlaySound(FILE_NAME, IntPtr.Zero, PlaySoundFlags.SND_FILENAME Or PlaySoundFlags.SND_SYNC) End Sub '==========END OF EXAMPLE =========================== you only have to have the Declare function in once.. make sure it decalres the first wav you made.(see up and below for both examples) 'when you want to add multiple wav's you must change the classes of each of the following, and dont forget each of these classes are listed twice everytime you creat 1 button.: 'FILE_NAME '\PROGRAM FILE\ROBOSAPIEN\IR\*.wav 'PlaySoundFlags 'Button1 '====================LEFT ARM UP ==================== Const FILE_NAME1 = "\Program Files\Robosapien\IR\LAU.wav" Public Enum PlaySoundFlags1 SND_SYNC = &H0 SND_ASYNC = &H1 SND_NODEFAULT = &H2 SND_MEMORY = &H4 SND_LOOP = &H8 SND_NOSTOP = &H10 SND_NOWAIT = &H2000 SND_ALIAS = &H10000 SND_ALIAS_ID = &H110000 SND_FILENAME = &H20000 SND_RESOURCE = &H40004 End Enum Declare Function PlaySound Lib "coredll.dll" (ByVal szSound As Char(), ByVal hMod As IntPtr, ByVal flags As PlaySoundFlags1) As Integer Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click PlaySound(FILE_NAME1, IntPtr.Zero, PlaySoundFlags1.SND_FILENAME Or PlaySoundFlags1.SND_SYNC) End Sub '====================LEFT ARM DOWN ======================== Const FILE_NAME2 = "\Program Files\Robosapien\IR\LAD.wav" Public Enum PlaySoundFlags2 SND_SYNC = &H0 SND_ASYNC = &H1 SND_NODEFAULT = &H2 SND_MEMORY = &H4 SND_LOOP = &H8 SND_NOSTOP = &H10 SND_NOWAIT = &H2000 SND_ALIAS = &H10000 SND_ALIAS_ID = &H110000 SND_FILENAME = &H20000 SND_RESOURCE = &H40004 End Enum Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click PlaySound(FILE_NAME2, IntPtr.Zero, PlaySoundFlags2.SND_FILENAME Or PlaySoundFlags2.SND_SYNC) End Sub '====================LEFT ARM IN ============================ Const FILE_NAME3 = "\Program Files\Robosapien\IR\LAI.wav" Public Enum PlaySoundFlags3 SND_SYNC = &H0 SND_ASYNC = &H1 SND_NODEFAULT = &H2 SND_MEMORY = &H4 SND_LOOP = &H8 SND_NOSTOP = &H10 SND_NOWAIT = &H2000 SND_ALIAS = &H10000 SND_ALIAS_ID = &H110000 SND_FILENAME = &H20000 SND_RESOURCE = &H40004 End Enum Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click PlaySound(FILE_NAME3, IntPtr.Zero, PlaySoundFlags3.SND_FILENAME Or PlaySoundFlags3.SND_SYNC) End Sub '====================LEFT ARM OUT =========================== Const FILE_NAME4 = "\Program Files\Robosapien\IR\LAO.wav" Public Enum PlaySoundFlags4 SND_SYNC = &H0 SND_ASYNC = &H1 SND_NODEFAULT = &H2 SND_MEMORY = &H4 SND_LOOP = &H8 SND_NOSTOP = &H10 SND_NOWAIT = &H2000 SND_ALIAS = &H10000 SND_ALIAS_ID = &H110000 SND_FILENAME = &H20000 SND_RESOURCE = &H40004 End Enum Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click PlaySound(FILE_NAME4, IntPtr.Zero, PlaySoundFlags4.SND_FILENAME Or PlaySoundFlags4.SND_SYNC) End Sub |
|||||||||||||||||||||||
Links | |||||||||||||||||||||||
Glitch | |||||||||||||||||||||||
![]() |
|||||||||||||||||||||||
About Me | |||||||||||||||||||||||
Figure 1 . Main RS Control Menu on my PPC Program / PC Program PicCommin Soon | |||||||||||||||||||||||
Figure 2 - shows a Input Jack going to a 7 LED board that i found to send WAV IR commands with PC/PPC their are websites that show you how to make your own, or where to buy one, my work is also available in SOURCE just incase you want to use your IR PORT/SERIAL on your PC/PPC, i just do not know how to do that type of programming |
|||||||||||||||||||||||
Projects currently working ON: - Visual Studio.NET 2003 Compact Framework - Program for Pocket PC made my me to Control RS ( better functions then Remote Program on PPC) should be finished this withing the week for version 1, using the sound jack 7infrared led device..(more versions to come) - Sound Jack to 7 Infrared LED - so i can create IR sounds and play them and rs will do his movements, either by PC or by PPC (must apply to program, button click play sound file) finished within the week hopefully(3 MAX) |
|||||||||||||||||||||||
Project: Robosapien Pocket PC Software, along with PC Software. (Jan - Feb 2005) Compatible: PPC: PPC2003/PPC2003 all Processors ARM SCALE etc... PC: Win 2000/XP Prorrammed using Visual Studio .net 2003 With Compact Framework PPC02/03 I created a few Forms... the MainRSControl, HomeMode, SoccerMode, Obstacle, FUNCTIONS ORANGE/RED LIGHT MAIN RS CONTROL : displays a picture of RS front.. however the Left side moves the LEFT arm/body, since I watch him from a Wireless Camera on his Head, this makes it easier to Control.. I know i Really should place a Back Photo of Robosapien. it has all his movement commands + theres a HIDE play Program function that hides the buttons to activate a sequence from his Sensors... HOW DOES IT WORK??? well it's really simple...you click a BUTTON on RS Main Control (ie LEFT ARM UP) and it executes a WAV file to be played. This WAV file then goes to the OUTPUT SPEAKER JACK on my PPC and through my Infrared Device (figure 2) HOW TO MAKE YOUR OWN??? simply download Total Remote for PPC, and learn the RS Commands then TEST them using the TOTAL REMOTE HARDWARE, but instead of using there hardware use a LINE OUT Jack from your PPC to your PC LINE IN and record it in it functioning, just need to make the WAV in a certain Codec... they Recomend SoundForge.. so i used that.. the CCODEC is 44 Hz 16 Bit Stereo. PCM * .WAV Format MENU ITEM/Menu on Bottom Screen Figure 1 - i created a menu for RS program, so you could MENU - EXIT PROGRAM (application.exit) - RS - RS SLEEP(sends WAV file to IR transmitter hooked to Seaker Input(see Figure 2 Right) - RS AWAKE MODES - Home - Created a map of my house, so you can pin/Click where RS is(BETA) - Soccer - Soccer Map click where to get ball... still designing... (extreme BETTA) - RS SECRETS/EASTER EGGS SUCH AS FREE ROAM - GARBAGE MODE - RAP MODE etc.. - Program MODE - sends WAV file to Program certain Sensor you Selected.. then you press RS buttons on the MAIN RS CONTROL to progrma him - LEFT - RIGHT - SONIC - MASTER OBSTACLE - basically like Macros - Front - shows 9 boxes (2 x 3) and you Click the Box and RS tries to Avoid that Area - Behind shows 4 Boxes (3 on one row then 1 above the 2nd) and Avoids Obstacles) FUNCTIONS: - YELLOW LIGHT FUNCTIONS(dispays a Form of all the RS SELECT Functions) - RED LIGHT FUNCTIONS(Displays a Form of all the RS SELECT SELECT Functions) - DEMO - 1 - 2 - 3 |