Get recogniser and interpreter working together #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Example main(sends a string back and forth):
#include "MicroBit.h"
#include "MicroBitAudioProcessor.h"
#include "StreamNormalizer.h"
#include "StreamSplitter.h"
#include "MicroBitMorseInterpreter.h"
#include "MicroBitMorsePlayer.h"
MicroBitAudioProcessor *fft = NULL;
MicroBitMorseCodeRecogniser *recogniser = NULL;
MicroBitMorseInterpreter *interpreter = NULL;
MicroBit uBit;
#define FREQUENCY 2200
#define TIME_UNIT 186
void onMessage(ManagedString message){
interpreter->stopInterpreting();
uBit.display.scroll(message);
interpreter->startInterpreting(onMessage);
}
void sendMessage(MicroBitEvent){
interpreter->stopInterpreting();
char in[] = "MORSE";
MicroBitMorsePlayer mp = MicroBitMorsePlayer(uBit, FREQUENCY, TIME_UNIT);
mp.play(in);
interpreter->startInterpreting(onMessage);
}
void interpret_test(){
}
int
main()
{
}