source: orbit/octave/GenerateAudioCommand/ @ a0b523e

Last change on this file since a0b523e was a0b523e, checked in by AzureViolin <zhanghaotz@…>, 9 years ago

flyOrbit.m can now generate arbitry control code for play from laptop. update

  • Property mode set to 100644
File size: 1.1 KB
[6aa182f]1This script suppose to generate Audio wave to talk to UPRtek's IR dongle and produce IR signal to control helicopter.
2this is an unfinished script, without complete documentation.
[a0b523e], Puzzlebox LLC
[6aa182f]4Released under GPLv2.
[a0b523e]61) open terminal;
72) switch to this path;
83) run octave;
94) type these commands:
11for laptop (not android yet)
12        flyOrbit('demo4',4049,'flyOrbitlaptop.wav',48000,100,'Android','flip');
13for iPad
14        flyOrbit('demo4',4049,'flyOrbitiPad.wav',48000,100,'iOS','notF');
18note that 'demo4' can be replaced with any code arrya like [1  0        1       1       0       1       1       1       0       1       0       0       1       1       0       0       1       0       0       1       1       1       1       1       0       1       1       0       1]
[6aa182f]205 first parameter is the code you want to produce as an audio file.
[a0b523e]21  second parameter is the space between two command codes [unit:samples].
22  3rd is the output file name.
23  4th is the sample rate (sample per second)
24  5th is how many times you want to repeat the code. 100 will generate a signal about 13 seconds long.
25  6th is option between iOS style code or Android style code.
26  7th when you use Android sytle code you need to flip the code that generated. This parameter will soon be obsolete in later version.
Note: See TracBrowser for help on using the repository browser.